Search code examples
javaubuntuapt-get

how to remove default-jre java installation from Ubuntu?


I had no java (i.e. java -version said java no found or similar)

I installed it like this:

sudo apt-get install default-jre

This results in installing java 1.6 - I need java 1.7

So the next probelem is how to uninstall it.

I tried this:

sudo apt-get --purge -remove default-jre

Which seemed to work, but when I do:

java -version

I still java respond with 1.6 - i.e. id didnt uninstall java.

Ok, so I guess -remove does not remove the thing it installed. Is there a way to o this?


Solution

  • sudo apt-get remove default-jre
    

    removes the package "default-jre". all tho you should ask in askUbuntu