卸载Centos7自带的OpenJDK

1, 通过命令 (rpm -qa | grep java) 查询已经安装的java包
[root@hadoop-master tools]# rpm -qa | grep java
java-1.8.0-openjdk-headless-1.8.0.101-3.b13.el7_2.x86_64
javapackages-tools-3.4.1-11.el7.noarch
tzdata-java-2016f-1.el7.noarch
java-1.8.0-openjdk-1.8.0.101-3.b13.el7_2.x86_64
python-javapackages-3.4.1-11.el7.noarch
2,通过命令(rpm -e --nodeps xxxxxx)卸载已经安装的OpenJDK包
[root@hadoop-master tools]# rpm -e --nodeps java-1.8.0-openjdk-1.8.0.101-3.b13.el7_2.x86_64
[root@hadoop-master tools]# rpm -e --nodeps java-1.8.0-openjdk-headless-1.8.0.101-3.b13.el7_2.x86_64
3,确认是否已经删除成功
[root@hadoop-master tools]# rpm -qa | grep java
javapackages-tools-3.4.1-11.el7.noarch
tzdata-java-2016f-1.el7.noarch
python-javapackages-3.4.1-11.el7.noarch

你可能感兴趣的:(Hadoop学习)