기존의 JDK 를 삭제하고 새로운 JDK를 깔기 위해서 기존의 JAVA JDK를 삭제하는 방법이다.
물론 UPDATE를 이용하는 것도 하나의 방법이지만, 새로운 시스템에 맞게 JDK를 새롭게 설치하고자 할때 사용한다.
JDK 버전 확인
rpm -qa | grep jdk
$) rpm -qa | grep jdk
java-1.6.0-openjdk-1.6.0.0-1.48.1.11.3.el6_2.x86_64
JDK 삭제
yum remove 현재JDK
$) yum remove java-1.6.0-openjdk-1.6.0.0-1.48.1.11.3.el6_2.x86_64
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Remove Process
Resolving Dependencies
--> Running transaction check
---> Package java-1.6.0-openjdk.x86_64 1:1.6.0.0-1.48.1.11.3.el6_2 will be erased
--> Finished Dependency Resolution
Dependencies Resolved
=====================================================================================================
Package Arch Version Repository Size
=====================================================================================================
Removing:
java-1.6.0-openjdk x86_64 1:1.6.0.0-1.48.1.11.3.el6_2 @updates 81 M
Transaction Summary
=====================================================================================================
Remove 1 Package(s)
Installed size: 81 M
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Erasing : 1:java-1.6.0-openjdk-1.6.0.0-1.48.1.11.3.el6_2.x86_64 1/1
Removed:
java-1.6.0-openjdk.x86_64 1:1.6.0.0-1.48.1.11.3.el6_2
Complete!
출처: http://ra2kstar.tistory.com/121?category=431717 [초보개발자 이야기.]