码迷,mamicode.com
首页 > 系统相关 > 详细

Linux卸载jdk

时间:2016-09-27 23:07:55      阅读:280      评论:0      收藏:0      [点我收藏+]

标签:

  

第一、以root账号登录如下
[whutsun@localhost ~]$ su root
Password: 
第二、查看系统已安装的jdk
[root@localhost whutsun]# rpm -qa|grep jdk
jdk-1.6.0_22-fcs
第三、卸载jdk
[root@localhost whutsun]# rpm -e --nodeps jdk-1.6.0_22-fcs
/var/tmp/rpm-tmp.17570: line 466: /usr/java/jdk1.6.0_22/bin/java: No such file or directory
第四、再次卸载,提示JDK已被删除,系统没有安装jdk
[root@localhost whutsun]# rpm -e --nodeps jdk-1.6.0_22-fcs
error: package jdk-1.6.0_22-fcs is not installed
下面是卸载与JAVA相关的文件,命令用法与上面相同,如果一次要需要卸载多个文件,直接在空格分隔即可,如:rpm -e --nodeps sun-javadb-javadoc-10.5.3-0.2 sun-javadb-common-10.5.3-0.2
 
[root@localhost whutsun]# rpm -qa|grep jdk
[root@localhost whutsun]# rpm -qa|grep java
sun-javadb-core-10.5.3-0.2
sun-javadb-demo-10.5.3-0.2
sun-javadb-javadoc-10.5.3-0.2
sun-javadb-common-10.5.3-0.2
sun-javadb-docs-10.5.3-0.2
[root@localhost whutsun]# rpm -e --nodeps sun-javadb-core-10.5.3-0.2
[root@localhost whutsun]# rpm -qa|grep java
sun-javadb-demo-10.5.3-0.2
sun-javadb-javadoc-10.5.3-0.2
sun-javadb-common-10.5.3-0.2
sun-javadb-docs-10.5.3-0.2
[root@localhost whutsun]# rpm -e --nodeps sun-javadb-demo-10.5.3-0.2
[root@localhost whutsun]# rpm -qa|grep java
sun-javadb-javadoc-10.5.3-0.2
sun-javadb-common-10.5.3-0.2
sun-javadb-docs-10.5.3-0.2
[root@localhost whutsun]# rpm -e --nodeps sun-javadb-javadoc-10.5.3-0.2 sun-javadb-common-10.5.3-0.2
[root@localhost whutsun]# rpm -qa|grep java
sun-javadb-docs-10.5.3-0.2
[root@localhost whutsun]# rpm -e --nodeps sun-javadb-docs-10.5.3-0.2
至此所有与JAVA相关的文件删除完成。

Linux卸载jdk

标签:

原文地址:http://www.cnblogs.com/dayaodao/p/5914596.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!