Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I unsuccessfully tried installing Java 6 by copy-pasting the following from http://www.webupd8.org/2012/11/oracle-sun-java-6-installer-available.html in the terminal window:

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java6-installer

It was running well until it came to a point where something like [connecting elibrary.oracle.com...connected] showed up (sorry I can't remember it correctly). There it was stuck for a good 3 hours. So I had to close the Terminal down, thereby killing the process midway.

Can anyone please tell me how to remove anything that has already been installed and take the system back to the state it was before attempting this installation. Any help is highly appreciated.

Regards, Bob.

share|improve this question
    
You want to give up completely, or you want to fix this installation? Repeating the apt-get install step might fix it. Or you could try to remove the broken package with apt-get remove --purge oracle-java6-installer –  janos Feb 25 at 20:02
    
I basically wanted to remove the broken package altogether and then try a fresh install with another ppa. So I think I'll try apt-get remove...also if you could suggest me another way to install Java 6 with browser plug-ins for I need it for work purposes. And I highly appreciate you answering my query. This community is the best thing about Ubuntu Linux. –  user252277 Feb 26 at 7:04

1 Answer 1

First, remove the PPA, you won't need it anymore :

sudo add-apt-repository -r ppa:webupd8team/java
sudo apt-get update

The, remove the package and purge the configuration files :

sudo apt-get remove --purge oracle-java6-installer

Finally, if it did manage to get to the point where it modifies the system itself :

sudo update-alternatives --remove-all java

You then can clean the cache :

sudo apt-get autoremove
sudo apt-get autoclean

Tada ! Back to a clean system !

share|improve this answer
    
Thanks a billion for the help.I appreciate the fact that it is so very systematically explained.Now everything went well but I need to mention a few things..When I type in [ sudo update-alternatives --remove-all java ] this is the response [update-alternatives: error: no alternatives for java.]. And when I type in [sudo apt-get autoclean] the response is [Reading package lists... Done Building dependency tree Reading state information... Done Del oracle-java6-installer 6u45-0~webupd8~3 [17.9 kB]. –  user252277 Feb 26 at 7:32
    
Does this mean the job is done because when I open the Dash and type Java I can still see a lot of Java 6 icons for eg. Oracle Java 6 Console, Oracle Java 6 Visual VM, Oracle Java 6 Plugin Control Panel, etc. Thanks a lot again. –  user252277 Feb 26 at 7:36
    
what does sudo update-alternatives --display java, java -version and dpkg -l | grep java say ? –  MrVaykadji Feb 26 at 17:47

Your Answer

 
discard

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.