Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to uninstall java 1.7.0_10 on ubuntu 12.04 using the instructions from here- After I complete the instructions, I check for java and it is still there. Any ideas?

share|improve this question
with java you mean ? OpenJDK ? What are the reasons for this ? You want to replace the jre ? – user1849534 Dec 29 '12 at 18:49
up vote 2 down vote accepted

Open a terminal window (alt+ctrl+t) and enter the following commands.

sudo update-alternatives --remove "java" "/usr/lib/jvm/jdk1.7.0_10/bin/java"

sudo update-alternatives --remove "javac" "/usr/lib/jvm/jdk1.7.0_10/bin/java"

sudo update-alternatives --remove "javaws" "/usr/lib/jvm/jdk1.7.0_10/bin/javaws"

Then remove the package in the /usr/lib/jvm

This should work!! :)

share|improve this answer
on yours, it says 1.7.0_05. Should i change it to 1.7.0_10 because that is what it says it is? – kyle_hamblett Dec 29 '12 at 20:03
also, what command do i use to remove the package once i am in the /usr/lib/bin? – kyle_hamblett Dec 29 '12 at 20:10
That was quite easy! However, i get an error that says 'this cannot be deleted'. do I need to change permissions? – kyle_hamblett Dec 29 '12 at 20:20
oh yeah..i should have guessed a terminal log into root.then type nautilus /usr/lib/jvm now try deleting – Mukund Dec 29 '12 at 20:24
Thanks! Now java is deleted, but all of the utilities are still in the dash home. are those tethered to java in any way or just there? – kyle_hamblett Dec 29 '12 at 20:30

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.