Home » Questions » Computers [ Ask a new question ]

How can I uninstall java development kit on Ubuntu?

How can I uninstall java development kit on Ubuntu?

Some time ago I have installed Java Development Kit on Ubutu. I typed "sudo apt-get java" or something like that. After that got "java" and "javac" commands in my command line. Now I would like to uninstall this JDK. I tried to type "sudo apt-get remove java". And as the result I get "E: Couldn't find package java".

Asked by: Guest | Views: 61
Total answers/comments: 1
Guest [Entry]

"Try in a console ""aptitude search jdk"" and watch at the results.
You can spot a character on the far left of each line. If that character is an 'i' it means that the package is currenty installed on the system. Probably it will be something like ""sun-java6-jdk"" or ""openjdk-6-jdk"".
At that point you can do ""sudo aptitude purge $1"" where $1 is the name of the package you have found from the previous result list."