Linux下卸载java jdk

卸载

查看已经安装的jdk

[root@izuf61z1rt2fvuhr3u07s0z ~]# rpm -qa|grep jdk
java-1.8.0-openjdk-headless-debug-1.8.0.151-5.b12.el7_4.x86_64
java-1.8.0-openjdk-src-debug-1.8.0.151-5.b12.el7_4.x86_64
copy-jdk-configs-2.2-5.el7_4.noarch
java-1.8.0-openjdk-headless-1.8.0.151-5.b12.el7_4.x86_64
java-1.8.0-openjdk-devel-debug-1.8.0.151-5.b12.el7_4.x86_64
java-1.8.0-openjdk-javadoc-zip-debug-1.8.0.151-5.b12.el7_4.noarch
java-1.8.0-openjdk-javadoc-zip-1.8.0.151-5.b12.el7_4.noarch
java-1.8.0-openjdk-debug-1.8.0.151-5.b12.el7_4.x86_64
java-1.8.0-openjdk-demo-debug-1.8.0.151-5.b12.el7_4.x86_64
java-1.8.0-openjdk-javadoc-debug-1.8.0.151-5.b12.el7_4.noarch
java-1.8.0-openjdk-javadoc-1.8.0.151-5.b12.el7_4.noarch

卸载命令

[root@izuf61z1rt2fvuhr3u07s0z ~]# yum -y remove java-1.8.0-openjdk-headless-debug-1.8.0.151-5.b12.el7_4.x86_64

等等,把这些一次卸载

卸载完成之后Java命令不被识别

[root@izuf61z1rt2fvuhr3u07s0z ~]# java -version
-bash: /usr/bin/java: No such file or directory
相关推荐
©️2020 CSDN 皮肤主题: 编程工作室 设计师:CSDN官方博客 返回首页