Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I completly remove Openjdk from redhat

Tags:

I am using Redhat 6, I was working with java 1.6 because I had a requirement to work with java 1.6. I update my redhat using yum uppdate and openjdk 1.8 got automatically installed. I tried to remove openjdk using

yum remove java* 

java 1.6 got remove but not openjdk.

and then I tried yum remove openjdk* this dint work. I tried to remove from UI but from there I am able to list openjdk 1.8 but not getting the option to remove it.
How do I completely remove openjdk.

like image 638
Varun Avatar asked Sep 14 '15 12:09

Varun


People also ask

How do I completely remove JDK?

From the Windows Control Panel: Click Programs and Features. Select Java Card Development Kit from the list of programs. Click Uninstall and then Finish.


2 Answers

First Find java product and version using below command:

rpm -qa | grep java 

And

rpm -qa | grep jdk 

OUTPUT like:

jdk1.7.0 

Then remove package using RPM or YUM:

yum remove jdk1.7.0 

or

rpm -e jdk1.7.0

like image 106
Nullpointer Avatar answered Oct 22 '22 02:10

Nullpointer


rpm -qa | grep openjdk | xargs  yum -y remove 
like image 44
lxy Avatar answered Oct 22 '22 03:10

lxy