November 20, 2018

Completely uninstall openjdk in RedHat Enterprise Linux (RHEL)

Hi all,

Today, I'll explain how to uninstall completely the openjdk from the RedHat Enterprise Linux (RHEL) machine.

Some of the softwares requires only the Oracle Java and having the openjdk, sometimes causes an issue. So, some users wants to remove the openjdk from the linux machine.


  • openjdk installed on the machine
  • Check for java alternatives, when multiple java versions installed
  • #> /usr/sbin/alternatives --config java
  • Result with + is the currently selected java for the machine


1. Find out the installed openjdk versions

#> rpm -qa | grep java
#> rpm -qa | grep jdk

Sample Output:


2. Remove the all openjdk versions

#> yum remove <>

#> yum remove java-1.8.0-openjdk-
#> yum remove java-1.8.0-openjdk-headless-

Hope, it is useful for you to configure java on your linux machine.

Please send your feedback and comments to

No comments:

Featured Post

Java Introdcution

Please send your review and feedback to