Eclipse workspace is a group of projects stored under a single folder name.

Sometimes, We want to delete the workspace and change the workspace.

How to remove and change workspace in Eclipse

There are multiple ways to remove workspace in eclipse.

  • delete the workspace directory One way is to go to the workspace directory and delete the workspace directory.

It removes the following things.

  • All projects in Workspace
  • Eclipse temporary cache
  • .metadata folder that contains settings

Next, during Eclipse startup, You can change the workspace.

  • change workspace using preferences Another way, change the workspace using the below steps

    • Go to Windows Menu and Select Preferences Menu Item
    • It opens the Preferences window popup
    • Go to the General Tab
    • Select Startup & Shutdown
    • next, Select workspaces and select the Remove Button option
    • It removes the workspace configuration settings from Eclipse and does not delete them from the file system.
    • You can select a new workspace and restart Eclipse.

This changes the default Eclipse startup workspace.

  • using configuraiton option Another way using configuration settings to change the workspace.

  • Go to the Eclipse installation folder

  • Select Eclipse -> configuration -> .settings folder

  • Open org.eclipse.ui.ide.prefs in a text editor

  • It contains the following content


MAX_RECENT_WORKSPACES=10
RECENT_WORKSPACES=c\:\\Workspace\nB\:\\workspace1
RECENT_WORKSPACES_PROTOCOL=3
SHOW_RECENT_WORKSPACES=false
SHOW_WORKSPACE_SELECTION_DIALOG=true
eclipse.preferences.version=1

The RECENT_WORKSPACES property contains all the recent workspaces separated by a colon(:), Remove this property or change its new workspace.

It does not delete the workspace from the file system.

How to change the default workspace in Eclipse?

There are multiple ways we can do that.

One way is using the Go to File menu, Select the Switch workspace option, and select the new workspace, next, restart Eclipse to take effect.

Another way is using the below steps.

  • Go to the Eclipse installation folder
  • select eclipse -> configuration folder
  • Open the config.ini file in the text editor

change osgi.instance.area.default key value from

[email protected]/workspace

to

[email protected]/newworkspae