How to Uninstall Java on MacOS

The first requirement to uninstall Java on Mac OS – you should have administrator privileges.

Second – you shouldn’t be afraid to use terminal.

This method works fine for any version of Java – 8, 9, 10, 11, 12, 13 or any other version.

Uninstalling Java on the Mac

  1. Click on Launchpad in the dock
  2. Search for Terminal and open it.
  3. Copy and paste commands to uninstall Java completely
sudo rm -rf /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin  
sudo rm -rf /Library/PreferencePanes/JavaControlPanel.prefPane  
sudo rm -rf /Library/Application\ Support/Oracle/Java/ 
sudo rm -rf /Library/Java/JavaVirtualMachines 

If you want to remove a concrete version of Java, e.g. Java 9.0.1 you need:

Check what Java versions are available:

ls /Library/Java/JavaVirtualMachines/

Remove the corresponding folder with that version:

sudo rm -fr /Library/Java/JavaVirtualMachines/jdk-9.0.1.jdk

That’s it! Java is successfully deleted.

Leave a Comment