Ubuntu – How to remove OpenJDK-9 and all related file to JDK

javajdknetbeansopenjdk

I know there are many similar post on here regarding issue i am having and trust me I have tried most of them and did not solve my issue.

I am trying to uninstall all the JDK files installed in my ubuntu. I want to do that because I heard that netbeans is keep crashing when i trying to open it and I get to know that netbeans have some issue with JDK-9 so i want to install JDK and want to re-install may be JDK-8

To remove OpenJDK-9 which i have in my system I have tried below commands so far.

sudo apt-get autoremove openjdk-9-jre-headless

sudo apt-get remove default-jdk

sudo apt-get purge openjdk-9-jre-headless gcj-4.9-jre-headless

but no luck, every time I run those commands I get below or similar message

every time I run those commands I get below or similar message

This is what i get when I run java-version to check what version of jdk i have

enter image description here

I will appreciate your help if you can show me steps to remove all JDK and all related files to JDK.

Best Answer

You have it removed. Bash is just telling you, hey, if you want to run java, here are the packages you can install. Try running which java. If no output, then you don't have any JDK installed. You can install any one of the packages suggested.

Related Question