Now that we have understood how to find out the installation method of JAVA on a Linux system, let’s proceed to understand how to remove/uninstall JAVA.
Java-1.7.0-openjdk-1.7.0.71-2.5.3.2.el6_6.x86_64Īlso, the “Oracle Java 8” was installed manually using the RPM file as per the following output, because it doesn’t show the distribution version which was shown in the previous output: $ rpm -qa | grep jdk You can double check the above result by running the below command: $ rpm -qa | grep java The following output shows that, “OpenJDK 1.7.0_71” was installed using the CentOS repository: $ java -version Use the below commands to find out how JAVA was installed on RPM based systems, such as RHEL, CentOS, Fedora and openSUSE.
* 3 /usr/lib/jvm/java-7-oracle/jre/bin/java 1072 manual mode 3.b) Checking Java installation method on RPM based systems Ii oracle-java7-installer 7u72+7u60arm-0~ webupd8~2 all Oracle Java(TM) Development Kit (JDK) 7Īlso, we can see that “Oracle JAVA 8” was installed using the manual method, as it is located under the ‘/opt’ directory, see below: Ii openjdk-7-jre-headless:amd64 7u71-2.5.3-0ubuntu1 amd64 OpenJDK Java runtime, using Hotspot JIT (headless)Īs per the below output, “Oracle Java 7” has been installed from third-party repository, namely "webupd8" : $ dpkg -l | grep oracle-java Ii openjdk-7-jre:amd64 7u71-2.5.3-0ubuntu1 amd64 OpenJDK Java runtime, using Hotspot JIT Ii openjdk-7-jdk:amd64 7u71-2.5.3- 0ubuntu1 amd64 OpenJDK Development Kit (JDK)
OpenJDK 64-Bit Server VM (build 24.65-b04, mixed mode)įeel free to double check whether “OpenJDK 1.7.0_65” was installed from the Ubuntu repository by running the below command, which in our case shows that it was installed from the Ubuntu official repository as shown below: $ dpkg -l | grep openjdk As per the below output, “OpenJDK 1.7.0_65” has been installed from the Ubuntu repository: $ java -version Use the below commands to check how JAVA was installed on an Ubuntu/Debian system. Manual or Third-party repository or RPM file.ģ.a) Checking Java installation method on Debian/Ubuntu Oracle JAVA : User might use one of these methods viz.
Refer the below link for installing Java on various Linux distributions.
Most of us believe that uninstalling Java is a difficult task in Linux, but it’s not as per my opinion, because I have installed Java on various distributions several times and removed it safely without any problems.