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.

For security reasons I want to remove/uninstall all instances of Java from my computer and prevent it from being installed again. On Windows computers I would simply just not install the software found at this webpage: http://java.com/en/download/manual.jsp

But on Ubuntu I've noticed that Java seems to have gotten installed on my system without my explicitly doing it and it shows in several ways, e.g., through plugins, etc.

What Java software on ubuntu is the equivalent of having installed the software at http://java.com/en/download/manual.jsp on Windows? Will uninstalling one "Java-named app" uninstall everything Java related on my computer?

How do I blacklist Java so that it isn't installed again?

share|improve this question
    
Why would you want to? –  Alvar Sep 4 '11 at 19:57
2  
? I said why I want to in the post. –  Chad--24216 Sep 4 '11 at 21:03
1  
That's a bit paranoid, especially given that java isn't installed by default. –  mikewhatever Sep 4 '11 at 23:03
2  
How did it get installed then on my system? I did a fresh install of 11.10 beta 1. I did not purposely install Java. Nor did I install the restricted extras package. I would like to completely uninstall all Java. Java has extremely poor security record. This is hardly "paranoid." –  Chad--24216 Sep 5 '11 at 0:57
    
Install 11.04 and you wont get Java. Then remove Java from the whitelist so it's harder to install it again. That should do what you want, what Java version do you have? :) –  Alvar Sep 5 '11 at 21:35

1 Answer 1

Fistly, I also think totally banning Java is a bit paranoid :)

Secondly, you can achieve what you want by removing Java packages from the system - this will also un-install all the programs which depend on it. Something like

sudo apt-get remove java-common

then you'll need to make it non-installable, so it won't ever be installed as a dependency of another program (which will make the packages which depend on it non-inslallable too). My google-fu says that you can achieve this by editing /etc/apt/preferences and adding something like

Package: java-common
Pin: release a=fakerepo
Pin-Priority: 1001

The "fakerepo" thing makes apt to look for the package in a wrong place which prevents its installation. For more details see http://linux.derkeiler.com/Mailing-Lists/Debian/2009-07/msg00479.html

share|improve this answer

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.