Skip to content

Instantly share code, notes, and snippets.

@antruongnguyen
Last active December 26, 2018 07:49
Show Gist options
  • Save antruongnguyen/cbd1001f329bc598faca88034b42754d to your computer and use it in GitHub Desktop.
Save antruongnguyen/cbd1001f329bc598faca88034b42754d to your computer and use it in GitHub Desktop.
Uninstall the JDK on macOS

To uninstall the JDK, you must have Administrator privileges and execute the remove command either as root or by using the sudo(8) tool.

Navigate to /Library/Java/JavaVirtualMachines and remove the directory whose name matches the following format: /Library/Java/JavaVirtualMachines/jdkmajor.minor.macro[_update].jdk

For example, to uninstall 8u6: rm -rf jdk1.8.0_06.jdk

Do not attempt to uninstall Java by removing the Java tools from /usr/bin. This directory is part of the system software and any changes will be reset by Apple the next time you perform an update of the OS.

See more https://docs.oracle.com/javase/8/docs/technotes/guides/install/mac_jdk.html#A1096903

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment