3

When I run which java command in my Ubuntu, it tells /usr/bin/java.

I initially installed java using sudo apt-get install ... command. Using this command where does it install all java components?

In my system in /usr/lib/jvm i see the following listings:

java-1.5.0-gcj-4.8-amd64  java-1.7.0-openjdk-amd64  java-7-openjdk-amd64

I want to completely remove Java, I tried Googling, but the instructions used in didn't work. Can anyone help me do this?

amc
  • 7,292

1 Answers1

9

/usr/bin/java is a link to the current alternative of /usr/bin/java, you can reconfigure the default java version(including javac and whatnot) by using update-java-alternatives. If you want to reconfigure alternatives for a different debian package you can use update-alternatives --config {package} instead.

You probably don't want to remove Java, but maybe you want to remove some of the older versions.

If you do want to remove Java 6 you can run

sudo apt-get remove openjdk-6*

Or to remove Java, but i don't recommend doing this.

sudo apt-get remove openjdk*
mjz19910
  • 303
  • 3
  • 9