How to Uninstall Openjdk on Ubuntu

OpenJDK Developers Guide

In this guide, I’m going to show you how to uninstall openjdk ubuntu real quick


What is OpenJDK


OpenJDK is the short form of Open Java Development Kit similar to Oracle's Java Development Kit used to develop Java Applications. Main difference between Oracle JDK and OpenJDK is that OpenJDK is free for all while Oracle Java Development Kit or Oracle JDK requires commercial license.


If you want to know more about OpenJDK, you can go through Open Java Development Kit Quick guide.


Steps to Uninstall OpenJDK Ubuntu



To Uninstall OpenJDK Ubuntu Java Runtime - Enter the below command on Ubuntu Terminal.

$ sudo apt-get remove openjdk*



To Uninstall OpenJDK Ubuntu Java Runtime along with dependencies - Enter the below command on Ubuntu Terminal.

$ sudo apt-get remove --auto-remove openjdk*



To Uninstall OpenJDK Ubuntu Java Runtime along with dependencies and configurations - Enter the below command on Ubuntu Terminal.

$ sudo apt-get purge --auto-remove openjdk*




Verify OpenJDK uninstall:


Once the above step is complete, we can verify whether the openjdk uninstall is successful or not.



Go to Ubuntu terminal and type java -version
The above command should not print the OpenJDK version you installed earlier.

Java -version




Congratulations !!! Now you have uninstalled OpenJDK from Ubuntu Successfully.



Also checkout how to uninstall openjdk on windows and linux here Uninstall OpenJDK on widows
Uninstall OpenJDK on Linux





Where to Download OpenJDK ?
- here are the OpenJDK versions you might be interested in!


OpenJDK 7
OpenJDK 8
OpenJDK 9
OpenJDK 10
OpenJDK 11
OpenJDK 12

If you are looking out for earlier OpenJDK versions, go to OpenJDK Archive



You Might Also Interested In Below Posts



  1. OpenJDK On Windows
  2. OpenJDK 7 Installation on Windows
  3. OpenJDK 8 Installation on Windows
  4. OpenJDK 9 Installation on Windows
  5. OpenJDK 10 Installation on Windows
  6. OpenJDK 11 Installation on Windows
  7. OpenJDK 12 Installation on Windows
  8. OpenJDK 13 Installation on Windows
  9. OpenJDK 14 Installation on Windows
  10. OpenJDK 15 Installation on Windows




x