Cleaning up the workspace (without re-building)

If you ever wanted to copy the full workspace to another machine you may have noticed that a billion generated files (e.g. bin) are copied and that this takes a long time. If you start Eclipse with the -clean option the workspace will regenerate all file again.

You can avoid this bye de-selecting in the “Build automatically” in the preferences under General -> Workspace.

If you now select Project -> Clean -> All and de-select “Start an Build automatically” in the dialog you end up with a workspace without the files of the build process.

About Lars Vogel

Lars Vogel is the founder and CEO of the vogella GmbH and works as Eclipse and Android consultant, trainer and book author. He is a regular speaker at international conferences, He is the primary author of vogella.com. With more than one million visitors per month this website is one of the central sources for Java, Eclipse and Android programming information.
This entry was posted in Eclipse. Bookmark the permalink.

4 Responses to Cleaning up the workspace (without re-building)

  1. -clean argument has nothing to do with the workspace. It’s an OSGi argument (equivalent to -osgi.clean) that is used to clear all the cached date (bundle resources of JAR’ed bundles, resolution state, etc.)

    It is specified as is (Eclipse Help, “Eclipse Runtime Options”)
    “osgi.clean
    if set to “true”, any cached data used by the OSGi framework and eclipse runtime will be wiped clean. This will clean the caches used to store bundle dependency resolution and eclipse extension registry data. Using this option will force eclipse to reinitialize these caches.”

    Anyways, I hope you’re doing well, Lars :)

  2. Lars Vogel says:

    Thanks for the clarification Benjamin. :-)

  3. Gilles says:

    Lars: Did you encounter a faster copy of the full workspace you mentionend in the beginning of the post?

Comments are closed.