Linux 卸载旧版本的 JDK 【原】

本人亲身实践:  测试环境 centos 5.4

 

1:# java -version

 

java  version "1.6.0"

 

java-openjdk-1.6.0. ..... [具体不大记得勒]

-----------------------------

2: 确定一下 jdk 的版本

[root@livecd centos]# rpm -qa | grep jdk
java-1.6.0-openjdk-1.6.0.0-1.2.b09.el5

 

卸载 jdk

# yum -y remove java-1.6.0-openjdk-1.6.0.0-1.2.b09.el5

 

 

-----------------------------------------------

 

Loaded plugins: fastestmirror
Setting up Remove Process
Resolving Dependencies
--> Running transaction check
---> Package java-1.6.0-openjdk.i386 1:1.6.0.0-1.2.b09.el5 set to be erased
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package                Arch     Version                    Repository     Size
================================================================================
Removing:
 java-1.6.0-openjdk     i386     1:1.6.0.0-1.2.b09.el5      installed      75 M

Transaction Summary
================================================================================
Install      0 Package(s)        
Update       0 Package(s)        
Remove       1 Package(s)        

Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Erasing        : java-1.6.0-openjdk                                       1/1

Removed:
  java-1.6.0-openjdk.i386 1:1.6.0.0-1.2.b09.el5                                

Complete!

 

3:$ rpm -qa | grep gcj
libgcj-4.1.2-46.el5
java-1.4.2-gcj-compat-1.4.2.0-40jpp.115

 

yum -y remove java-1.4.2-gcj-compat-1.4.2.0-40jpp.115

 

 

Loaded plugins: fastestmirror
Setting up Remove Process
Resolving Dependencies
--> Running transaction check
---> Package java-1.4.2-gcj-compat.i386 0:1.4.2.0-40jpp.115 set to be erased
--> Processing Dependency: java-gcj-compat >= 1.0.31 for package: xml-commons-apis
--> Processing Dependency: java-gcj-compat >= 1.0.31 for package: xml-commons-apis
--> Processing Dependency: java-gcj-compat >= 1.0.31 for package: tomcat5-servlet-2.4-api
--> Processing Dependency: java-gcj-compat >= 1.0.31 for package: tomcat5-servlet-2.4-api
--> Processing Dependency: java-gcj-compat for package: antlr
--> Processing Dependency: java-gcj-compat for package: antlr
--> Processing Dependency: java-gcj-compat >= 1.0.31 for package: tomcat5-jsp-2.0-api
--> Processing Dependency: java-gcj-compat >= 1.0.31 for package: tomcat5-jsp-2.0-api
--> Processing Dependency: java-gcj-compat for package: bsh
--> Processing Dependency: java-gcj-compat for package: bsh
--> Processing Dependency: java-gcj-compat for package: bsf
--> Processing Dependency: java-gcj-compat for package: bsf
--> Processing Dependency: java-gcj-compat for package: xalan-j2
--> Processing Dependency: java-gcj-compat for package: xalan-j2
--> Processing Dependency: java-gcj-compat for package: hsqldb
--> Processing Dependency: java-gcj-compat for package: hsqldb
--> Processing Dependency: java-gcj-compat >= 1.0.31 for package: xerces-j2
--> Processing Dependency: java-gcj-compat >= 1.0.31 for package: xerces-j2
--> Processing Dependency: java-gcj-compat >= 1.0.64 for package: gjdoc
--> Processing Dependency: java-gcj-compat >= 1.0.64 for package: gjdoc
--> Processing Dependency: java-gcj-compat for package: xml-commons-resolver
--> Processing Dependency: java-gcj-compat for package: xml-commons-resolver
--> Running transaction check
---> Package antlr.i386 0:2.7.6-4jpp.2 set to be erased
---> Package bsf.i386 0:2.3.0-11jpp.1 set to be erased
---> Package bsh.i386 0:1.3.0-9jpp.1 set to be erased
--> Processing Dependency: bsh for package: openoffice.org-core
---> Package gjdoc.i386 0:0.7.7-12.el5 set to be erased
---> Package hsqldb.i386 1:1.8.0.9-1jpp.2 set to be erased
---> Package tomcat5-jsp-2.0-api.i386 0:5.5.23-0jpp.7.el5_3.2 set to be erased
---> Package tomcat5-servlet-2.4-api.i386 0:5.5.23-0jpp.7.el5_3.2 set to be erased
---> Package xalan-j2.i386 0:2.7.0-6jpp.1 set to be erased
---> Package xerces-j2.i386 0:2.7.1-7jpp.2 set to be erased
---> Package xml-commons-apis.i386 0:1.3.02-0.b2.7jpp.10 set to be erased
---> Package xml-commons-resolver.i386 0:1.1-1jpp.12 set to be erased
--> Running transaction check
---> Package openoffice.org-core.i386 1:2.3.0-6.11.el5 set to be erased
--> Processing Dependency: libavmedia680li.so for package: openoffice.org-calc
--> Processing Dependency: libbasegfx680li.so for package: openoffice.org-calc
--> Processing Dependency: libbf_go680li.so for package: openoffice.org-calc
--> Processing Dependency: libbf_ofa680li.so for package: openoffice.org-calc
--> Processing Dependency: libbf_sb680li.so for package: openoffice.org-calc
--> Processing Dependency: libbf_svx680li.so for package: openoffice.org-calc
--> Processing Dependency: libbf_xo680li.so for package: openoffice.org-calc
--> Processing Dependency: libcomphelp4gcc3.so for package: openoffice.org-writer
--> Processing Dependency: libcomphelp4gcc3.so for package: openoffice.org-calc
--> Processing Dependency: libcomphelp4gcc3.so for package: openoffice.org-math
--> Processing Dependency: libdbtools680li.so for package: openoffice.org-calc
--> Processing Dependency: libfile680li.so for package: openoffice.org-calc
--> Processing Dependency: libgo680li.so for package: openoffice.org-calc
--> Processing Dependency: libi18nisolang1gcc3.so for package: openoffice.org-calc
--> Processing Dependency: liblegacy_binfilters680li.so for package: openoffice.org-calc
--> Processing Dependency: liblegacy_binfilters680li.so(UDK_3_0_0) for package: openoffice.org-calc
--> Processing Dependency: libsb680li.so for package: openoffice.org-writer
--> Processing Dependency: libsb680li.so for package: openoffice.org-calc
--> Processing Dependency: libsd680li.so for package: openoffice.org-impress
--> Processing Dependency: libsfx680li.so for package: openoffice.org-writer
--> Processing Dependency: libsfx680li.so for package: openoffice.org-calc
--> Processing Dependency: libsfx680li.so for package: openoffice.org-math
--> Processing Dependency: libso680li.so for package: openoffice.org-writer
--> Processing Dependency: libso680li.so for package: openoffice.org-calc
--> Processing Dependency: libsoffice.so for package: openoffice.org-impress
--> Processing Dependency: libsoffice.so for package: openoffice.org-writer
--> Processing Dependency: libsoffice.so for package: openoffice.org-calc
--> Processing Dependency: libsot680li.so for package: openoffice.org-writer
--> Processing Dependency: libsot680li.so for package: openoffice.org-calc
--> Processing Dependency: libsot680li.so for package: openoffice.org-math
--> Processing Dependency: libstlport_gcc.so for package: openoffice.org-impress
--> Processing Dependency: libstlport_gcc.so for package: openoffice.org-writer
--> Processing Dependency: libstlport_gcc.so for package: openoffice.org-calc
--> Processing Dependency: libstlport_gcc.so for package: openoffice.org-math
--> Processing Dependency: libsvl680li.so for package: openoffice.org-writer
--> Processing Dependency: libsvl680li.so for package: openoffice.org-calc
--> Processing Dependency: libsvl680li.so for package: openoffice.org-math
--> Processing Dependency: libsvt680li.so for package: openoffice.org-writer
--> Processing Dependency: libsvt680li.so for package: openoffice.org-calc
--> Processing Dependency: libsvt680li.so for package: openoffice.org-math
--> Processing Dependency: libsvx680li.so for package: openoffice.org-impress
--> Processing Dependency: libsvx680li.so for package: openoffice.org-writer
--> Processing Dependency: libsvx680li.so for package: openoffice.org-calc
--> Processing Dependency: libsvx680li.so for package: openoffice.org-math
--> Processing Dependency: libsw680li.so for package: openoffice.org-writer
--> Processing Dependency: libtk680li.so for package: openoffice.org-writer
--> Processing Dependency: libtk680li.so for package: openoffice.org-calc
--> Processing Dependency: libtk680li.so for package: openoffice.org-math
--> Processing Dependency: libtl680li.so for package: openoffice.org-writer
--> Processing Dependency: libtl680li.so for package: openoffice.org-calc
--> Processing Dependency: libtl680li.so for package: openoffice.org-math
--> Processing Dependency: libucbhelper4gcc3.so for package: openoffice.org-writer
--> Processing Dependency: libucbhelper4gcc3.so for package: openoffice.org-calc
--> Processing Dependency: libucbhelper4gcc3.so for package: openoffice.org-math
--> Processing Dependency: libuno_cppu.so.3 for package: openoffice.org-impress
--> Processing Dependency: libuno_cppu.so.3 for package: openoffice.org-writer
--> Processing Dependency: libuno_cppu.so.3 for package: openoffice.org-calc
--> Processing Dependency: libuno_cppu.so.3 for package: openoffice.org-math
--> Processing Dependency: libuno_cppu.so.3(UDK_3.1) for package: openoffice.org-calc
--> Processing Dependency: libuno_cppu.so.3(UDK_3_0_0) for package: openoffice.org-impress
--> Processing Dependency: libuno_cppu.so.3(UDK_3_0_0) for package: openoffice.org-writer
--> Processing Dependency: libuno_cppu.so.3(UDK_3_0_0) for package: openoffice.org-calc
--> Processing Dependency: libuno_cppu.so.3(UDK_3_0_0) for package: openoffice.org-math
--> Processing Dependency: libuno_cppuhelpergcc3.so.3 for package: openoffice.org-impress
--> Processing Dependency: libuno_cppuhelpergcc3.so.3 for package: openoffice.org-writer
--> Processing Dependency: libuno_cppuhelpergcc3.so.3 for package: openoffice.org-calc
--> Processing Dependency: libuno_cppuhelpergcc3.so.3 for package: openoffice.org-math
--> Processing Dependency: libuno_cppuhelpergcc3.so.3(UDK_3.1) for package: openoffice.org-calc
--> Processing Dependency: libuno_cppuhelpergcc3.so.3(UDK_3_0_0) for package: openoffice.org-impress
--> Processing Dependency: libuno_cppuhelpergcc3.so.3(UDK_3_0_0) for package: openoffice.org-writer
--> Processing Dependency: libuno_cppuhelpergcc3.so.3(UDK_3_0_0) for package: openoffice.org-calc
--> Processing Dependency: libuno_cppuhelpergcc3.so.3(UDK_3_0_0) for package: openoffice.org-math
--> Processing Dependency: libuno_sal.so.3 for package: openoffice.org-impress
--> Processing Dependency: libuno_sal.so.3 for package: openoffice.org-writer
--> Processing Dependency: libuno_sal.so.3 for package: openoffice.org-calc
--> Processing Dependency: libuno_sal.so.3 for package: openoffice.org-math
--> Processing Dependency: libuno_sal.so.3(UDK_3.1) for package: openoffice.org-calc
--> Processing Dependency: libuno_sal.so.3(UDK_3.1) for package: openoffice.org-math
--> Processing Dependency: libuno_sal.so.3(UDK_3.3) for package: openoffice.org-impress
--> Processing Dependency: libuno_sal.so.3(UDK_3.3) for package: openoffice.org-writer
--> Processing Dependency: libuno_sal.so.3(UDK_3.3) for package: openoffice.org-calc
--> Processing Dependency: libuno_sal.so.3(UDK_3.3) for package: openoffice.org-math
--> Processing Dependency: libuno_sal.so.3(UDK_3_0_0) for package: openoffice.org-impress
--> Processing Dependency: libuno_sal.so.3(UDK_3_0_0) for package: openoffice.org-writer
--> Processing Dependency: libuno_sal.so.3(UDK_3_0_0) for package: openoffice.org-calc
--> Processing Dependency: libuno_sal.so.3(UDK_3_0_0) for package: openoffice.org-math
--> Processing Dependency: libutl680li.so for package: openoffice.org-writer
--> Processing Dependency: libutl680li.so for package: openoffice.org-calc
--> Processing Dependency: libutl680li.so for package: openoffice.org-math
--> Processing Dependency: libvcl680li.so for package: openoffice.org-writer
--> Processing Dependency: libvcl680li.so for package: openoffice.org-calc
--> Processing Dependency: libvcl680li.so for package: openoffice.org-math
--> Processing Dependency: libvos3gcc3.so for package: openoffice.org-calc
--> Processing Dependency: libxo680li.so for package: openoffice.org-writer
--> Processing Dependency: libxo680li.so for package: openoffice.org-calc
--> Processing Dependency: libxo680li.so for package: openoffice.org-math
--> Processing Dependency: openoffice.org-core = 1:2.3.0-6.11.el5 for package: openoffice.org-impress
--> Processing Dependency: openoffice.org-core = 1:2.3.0-6.11.el5 for package: openoffice.org-writer
--> Processing Dependency: openoffice.org-core = 1:2.3.0-6.11.el5 for package: openoffice.org-math
--> Processing Dependency: openoffice.org-core = 1:2.3.0-6.11.el5 for package: openoffice.org-calc
--> Processing Dependency: openoffice.org-core = 1:2.3.0-6.11.el5 for package: openoffice.org-xsltfilter
--> Running transaction check
---> Package openoffice.org-calc.i386 1:2.3.0-6.11.el5 set to be erased
---> Package openoffice.org-impress.i386 1:2.3.0-6.11.el5 set to be erased
---> Package openoffice.org-math.i386 1:2.3.0-6.11.el5 set to be erased
---> Package openoffice.org-writer.i386 1:2.3.0-6.11.el5 set to be erased
---> Package openoffice.org-xsltfilter.i386 1:2.3.0-6.11.el5 set to be erased
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package                     Arch   Version                   Repository   Size
================================================================================
Removing:
 java-1.4.2-gcj-compat       i386   1.4.2.0-40jpp.115         installed    441
Removing for dependencies:
 antlr                       i386   2.7.6-4jpp.2              installed   2.5 M
 bsf                         i386   2.3.0-11jpp.1             installed   810 k
 bsh                         i386   1.3.0-9jpp.1              installed   1.2 M
 gjdoc                       i386   0.7.7-12.el5              installed   1.7 M
 hsqldb                      i386   1:1.8.0.9-1jpp.2          installed   4.0 M
 openoffice.org-calc         i386   1:2.3.0-6.11.el5          installed    20 M
 openoffice.org-core         i386   1:2.3.0-6.11.el5          installed   228 M
 openoffice.org-impress      i386   1:2.3.0-6.11.el5          installed   4.8 M
 openoffice.org-math         i386   1:2.3.0-6.11.el5          installed   3.4 M
 openoffice.org-writer       i386   1:2.3.0-6.11.el5          installed   7.2 M
 openoffice.org-xsltfilter   i386   1:2.3.0-6.11.el5          installed   257 k
 tomcat5-jsp-2.0-api         i386   5.5.23-0jpp.7.el5_3.2     installed   163 k
 tomcat5-servlet-2.4-api     i386   5.5.23-0jpp.7.el5_3.2     installed   250 k
 xalan-j2                    i386   2.7.0-6jpp.1              installed    10 M
 xerces-j2                   i386   2.7.1-7jpp.2              installed   6.9 M
 xml-commons-apis            i386   1.3.02-0.b2.7jpp.10       installed   878 k
 xml-commons-resolver        i386   1.1-1jpp.12               installed   343 k

Transaction Summary
================================================================================
Install      0 Package(s)        
Update       0 Package(s)        
Remove      18 Package(s)        

Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Erasing        : openoffice.org-writer                                   1/18
  Erasing        : openoffice.org-xsltfilter                               2/18
  Erasing        : gjdoc                                                   3/18
  Erasing        : xml-commons-apis                                        4/18
  Erasing        : openoffice.org-calc                                     5/18
  Erasing        : antlr                                                   6/18
  Erasing        : hsqldb                                                  7/18
  Erasing        : tomcat5-servlet-2.4-api                                 8/18
  Erasing        : openoffice.org-math                                     9/18
  Erasing        : openoffice.org-impress                                 10/18
  Erasing        : xml-commons-resolver                                   11/18
  Erasing        : openoffice.org-core                                    12/18
  Erasing        : bsh                                                    13/18
  Erasing        : tomcat5-jsp-2.0-api                                    14/18
  Erasing        : java-1.4.2-gcj-compat                                  15/18
  Erasing        : xerces-j2                                              16/18
  Erasing        : bsf                                                    17/18
  Erasing        : xalan-j2                                               18/18

Removed:
  java-1.4.2-gcj-compat.i386 0:1.4.2.0-40jpp.115                               

Dependency Removed:
  antlr.i386 0:2.7.6-4jpp.2                                                    
  bsf.i386 0:2.3.0-11jpp.1                                                     
  bsh.i386 0:1.3.0-9jpp.1                                                      
  gjdoc.i386 0:0.7.7-12.el5                                                    
  hsqldb.i386 1:1.8.0.9-1jpp.2                                                 
  openoffice.org-calc.i386 1:2.3.0-6.11.el5                                    
  openoffice.org-core.i386 1:2.3.0-6.11.el5                                    
  openoffice.org-impress.i386 1:2.3.0-6.11.el5                                 
  openoffice.org-math.i386 1:2.3.0-6.11.el5                                    
  openoffice.org-writer.i386 1:2.3.0-6.11.el5                                  
  openoffice.org-xsltfilter.i386 1:2.3.0-6.11.el5                              
  tomcat5-jsp-2.0-api.i386 0:5.5.23-0jpp.7.el5_3.2                             
  tomcat5-servlet-2.4-api.i386 0:5.5.23-0jpp.7.el5_3.2                         
  xalan-j2.i386 0:2.7.0-6jpp.1                                                 
  xerces-j2.i386 0:2.7.1-7jpp.2                                                
  xml-commons-apis.i386 0:1.3.02-0.b2.7jpp.10                                  
  xml-commons-resolver.i386 0:1.1-1jpp.12                                      

Complete!

4: 测试 :   卸载成功
[root@livecd centos]# java -version
bash: /usr/bin/java: No such file or directory

 

 

你可能感兴趣的:(jdk,tomcat,linux,centos,gcc,processing)