How do I completely uninstall Eclipse so I can sort out my Subclipse trouble?

The 2 most popular ways of removing eclipse are to either

  1. go into the 'software center', search for eclipse, and then remove it, or

  2. remove it from a terminal. For example: $sudo apt-get autoremove --purge eclipse

1 seems to be the better way, as 2 leaves pieces behind. In either case, do the following after you remove it:

$whereis eclipse

and if there are any pieces left behind, remove them.

You also should have a .eclipse directory in your home directory. Neither 1 nor 2 will wipe those out. So:

home/yours$rm -r .eclipse

OK, so now to reinstall it, you could use apt-get, or software center, or download the compressed archive file from http://www.eclipse.org/downloads/ I prefer to download the latest version. I also prefer eclipse 'classic', and then I can add the features I need to it. So after downloading:

$sudo tar xvf eclipse-SDK-4.2.1-linux-gtk-x86_64.tar.gz -C /opt

To run:

$/opt/eclipse/.eclipse

There are then a few different options for creating a shortcut. Here's a quick run down of one that should only take a few seconds (you may not need sudo and chmod):

$sudo touch /usr/share/applications/eclipse.desktop
$sudo chmod 777 /usr/share/applications/eclipse.desktop
$vim /usr/share/applications/eclipse.desktop 

and paste:

[Desktop Entry]
Name=Eclipse
Type=Application
Exec=/opt/eclipse/eclipse
Terminal=false
Icon=/opt/eclipse/icon.xpm
Comment=Integrated Development Environment
NoDisplay=false
Categories=Development;IDE
Name[en]=eclipse.desktop

and then run:

$cd /usr/local/bin
$sudo ln -s /opt/eclipse/eclipse
$eclipse

Then you can just right click on the launcher icon (in Ubuntu 12.04 at least) and lock it to the launcher.


For others having this problem (as I just was):

  1. Click "Available Software Sites" link under the "Add..." button
  2. Highlight the listing that is causing you the problem and click "Remove"
  3. Click "OK"
  4. Click "Add..." again and enter the URL once again

By 'this problem' I mean receiving the "Duplicate Location" error that won't let you click "OK "when you add the URL of Subclipse into the Location field after clicking "Add...".


The following solution assumes you installed with the installer (as opposed to your package manager). There is a hidden file in your home user directory (the path is /home/user). You can use the shortcut Ctrl+H to discover it. And then you would find a folder named .eclipse, just remove this folder, as it includes all the setting you have set before.

Alternatively, you can open a terminal, and use the following command:

rm -r ~/.eclipse

Ubuntu, and all Unix systems are similar. They are all Inheritance systems, which will keep the user's setting in home.