'Eclipse clean .metadata but keep project references

I have an Eclipse based software IDE where I create different workspaces for different projects. I very much like to use "File -> Switch Workspace" to easily swap between which project I am working on.

To reduce the amount of hard drive space needed to store the projects in our CM tool, I'm trying to figure out a good way to delete the extraneous files out of the .metadata files, but still keep the references to the project folders themselves. Right now I am going through the .metadata directory and manually deleting files that are large.

Is there an easy way to identify what the bare minimum fileset is for the .metadata folder?

I am aware you can just delete the entire .metadata folder, but then I have to "import" the project, which is an extra step I'd like to avoid.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source