Uninstall linux comes with java

The first step: rpm query java installation package name
[root@localhost java]# rpm -qa | grep java
java-1.7.0-openjdk-headless-1.7.0.51-2.4.5.5.el7.x86_64
tzdata-java-2014b- 1.el7.noarch
python-javapackages-3.4.1-5.el7.noarch
java-1.7.0-openjdk-1.7.0.51-2.4.5.5.el7.x86_64
javapackages-tools-3.4.1-5.el7.noarch
Note: Use the following three queries
#rpm -qa |grep java
#rpm -qa |grep jdk
#rpm -qa |grep gcj
Step 2: --Query
the file location where the installation package is installed to the system
rpm -ql java-1.7.0 -openjdk-headless-1.7.0.51-2.4.5.5.el7.x86_64
----Query the file location where the installation package is installed to the system and display the file status
rpm -qs java-1.7.0-openjdk-1.7.0.51-2.4. 5.5.el7.x86_64
Step 3: rmp delete the installation package
rpm -e --nodeps java-1.7.0-openjdk-headless-1.7.0.51-2.4.5.5.el7.x86_64
rpm -e --nodeps tzdata-java-2014b-1.el7.noarch
rpm -e --nodeps python-javapackages-3.4.1-5.el7.noarch
rpm -e --nodeps java-1.7.0-openjdk- 1.7.0.51-2.4.5.5.el7.x86_64
rpm -e --nodeps javapackages-tools-3.4.1-5.el7.noarch
Note: After deleting, use rpm -qa | grep java to check whether there is an installation
Step 4: find Command to query whether there are related folders, if so, you can use rm to delete
find / -name java
find / -name jdk
find / -name jre
find / -name gcj

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=327074681&siteId=291194637