Get a Free iPhone 4 from Xpango - click here

Thursday, August 19, 2010

Steps to Uninstall Java in Linux

There are two ways to uninstall Java. Please use the method that you used when you installed Java. For example, if you used RPM to install Java, then use the RPM uninstallation method.

RPM Package:

If the Java Development Kit was installed using RPM we can check it using ‘rpm -qa | grep jdk’. If this command shows any JDK version then you can easily remove the rpm package using
‘rpm –erase <javapackagename>‘

example:
Login as super user:su
rpm -qa |grep jdk

RPM reports package.
Unistall Java using :
rpm -e <jdk version>

Self Extracting File:

If the JDK was installed using self extraction zip file then we can directly remove the JDK folder using ‘rm -rf ‘

example:
In my box jdk is installed using selfextracting file and path is:
/usr/share/java-1.6.0/jdk1.6.0_13.

There is a way to find the java version we currently using.
Login as super user:su

update-alternatives --config java
It will show the java versions installed and currently used version.
You can select the version you need.

After locating jdk folder,remove the folder to uninstall.
In my case:

rm -rf /usr/share/java1.6.0/jdk1.6.0_13


If you are going to reinstall Java, you don't need to uninstall Java Plug-in. Just use the -f option for ln when creating a new symbolic link.
Example: ln -f /usr/lib/mozilla/plugins/libjavaplugin_oji.so

But in case you want to completely remove java,remove the symbolic link from mozilla plugin.

Login as super user:su

rm /usr/lib/mozilla/plugins/libjavaplugin_oji.so.

No comments:

Post a Comment