Centos7 usually comes with its own openjdk. We usually use Oracle's jdk, so we need to uninstall it.
Step 1: Check whether the system has installed jdk
#rpm -qa|grep java
or
#rpm -qa|grep jdk
or (recommended tutorial: centos usage tutorial)
#rpm -qa|grep gcj
Step 2: Uninstall the installed jdk
#rpm -e --nodeps java-1.8.0-openjdk-1.8.0.131-11.b12.el7.x86_64 #rpm -e --nodeps java-1.7.0-openjdk-1.7.0.141-2.6.10.5.el7.x86_64 #rpm -e --nodeps java-1.8.0-openjdk-headless-1.8.0.131-11.b12.el7.x86_64 #rpm -e --nodeps java-1.7.0-openjdk-headless-1.8.0.131-11.b12.el7.x86_64
Step 3: Verify that there is still jdk
#rpm -qa|grep java #java -version
There is no content to prove that it has been uninstalled cleanly.
Related video tutorial sharing: linux video tutorial
The above is the detailed content of How to uninstall jdk on centos. For more information, please follow other related articles on the PHP Chinese website!