Java

Java in Action Downloads Help Center

Installing Java

   

How do I uninstall Java for Linux ?


This article applies to:
  • Platform(s):
    Sun Java Desktop System, Red Hat Linux, SUSE Linux
  • Browser(s):
    Netscape 6.2x, Netscape 7, Mozilla 1.4+
  • JRE version(s):
    1.5.0


The uninstallation process consists of:
  1. Java Plug-in Uninstallation
  2. Java Runtime Environment (JRE) Uninstallation


I. Java Plug-in Uninstallation: Mozilla browser

If you are going to reinstall JRE, 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

If you want to completely remove Java from your Linux box, the procedure of removing the symbolic link is described below.
  1. Open Terminal Window,
  2. Log in as the super user
  3. Type: rm /usr/lib/mozilla/plugins/libjavaplugin_oji.so
  4. You will be prompted: rm: remove symbolic link `/usr/lib/mozilla/plugins/libjavaplugin_oji.so' ?
  5. Type: Y


II. JRE Uninstallation

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


  1. RPM uninstallation

    Note: If you have RPM on your Linux box, you should first find out if Java is already installed using RPM. If Java is not installed using RPM, you should skip reading.
    1. Open Terminal Window
    2. Login as the super user
    3. Try to find jre package by typing: rpm -qa
    4. If RPM reports a package similar to jre-<version>-fcs, then Java is installed with RPM.

      Note: Normally, you do not need to uninstall JRE with RPM, because RPM is able to uninstall the old JRE when installing a new version! You may skip reading, unless you want to remove JRE permanently.
    5. To uninstall the JRE, type: rpm -e jre-<version>-fcs


  1. Self-extracting file uninstallation
    1. Find out if Java is installed in some folder. Common locations are /usr/java/jre_<version> or /opt/jre_nb/jre_<version>/bin/java/
    2. When you have located the folder, you may delete folder.
      Warning: You should be certain that Java is not already installed using RPM before removing the folder.
    3. Type: rm -r name. For example: rm -r jre1.5.0



NEED MORE HELP?
If you require further assistance, please make sure you check through our Help and FAQ sections thoroughly. We probably have a page that answers your question.

You may find information on the following topics in the Help section:
Installation Instructions
Configuration
Error Messages
Applet Application




Help Resources
> Installing Java
> Configuring Java
> Error Messages
> Applet Application
> Legal

 

FAQ
> General Questions
> Java for Mobile Devices

 

Select Language | Java Wear | Newsletter | About Java Technology | Partner with Us | Developers | java.com Changes
Privacy | Terms of Use | Trademarks | License | Disclaimer | Contact

Sun Microsystems