Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Should I regularly delete the .metadata folder from the Eclipse workspace? What problems will it cause?

Tags:

In my Eclipse workspace I've noticed the .metadata folder keeps growing. Should I regularly delete this folder? What would be the consequences of it?

Apart from that, what information does the .metadata folder contain?

like image 935
Anand Avatar asked Sep 02 '11 06:09

Anand


People also ask

Can I delete .metadata folder?

Yes, go ahead and delete the . metadata.

What is .metadata file in Eclipse?

The . metadata folder is an area where Eclipse plug-ins can save any information they want to save. This will include things like your preference settings, information about the contents of projects and the indices the Java plug-in uses to find classes and methods quickly.

Where is .metadata of Eclipse workspace?

You should find something like your-eclipse-workspace\. metadata\. plugins\org. eclipse.

How do I clean up a folder in Eclipse?

One of the things that you might want to try out is starting eclipse with the -clean option. If you have chosen to have eclipse use the same workspace every time then there is nothing else you need to do after that. With that option in place the workspace should be cleaned out.


1 Answers

Deleting all the .metadata folder would remove all your project references from your workspace.

If your project is actually stored completely in the workspace (i.e. its sources are stored in the default workspace path), you would also lose your project contents as well - which is worse since you wouldn't be able to re-import them.

I always recommend to keep your Eclipse project and its sources separate from the workspace.
See "What is "src" directory created by Eclipse?".
That way, the settings specific to your projects are saved within your project (in the .settings directory), and not in the workspace.
Also, you need to move your launcher definitions in your project as well.

In that configuration, you can delete a workspace without much damage and simply re-import your project into a new workspace.

like image 86
VonC Avatar answered Oct 21 '22 13:10

VonC