Skip to content

Instantly share code, notes, and snippets.

@cbfl
Last active March 26, 2019 01:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cbfl/4594828 to your computer and use it in GitHub Desktop.
Save cbfl/4594828 to your computer and use it in GitHub Desktop.
rm ~/Library/Caches/Java/deployment.properties
sudo rm -rf /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0
sudo rm -f /System/Library/Frameworks/JavaVM.framework/Versions/1.6
sudo rm -rf /System/Library/Java/JavaVirtualMachines/*
sudo rm -rf /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin
sudo rm -f /private/var/db/receipts/com.apple.pkg.JavaForMacOSX107.bom
sudo rm -f /private/var/db/receipts/com.apple.pkg.JavaForMacOSX107.plist
DONWLOAD: http://download.oracle.com/otn-pub/java/jdk/7u15-b03/jdk-7u15-macosx-x64.dmg
@AskFeeds
Copy link

There are two steps to uninstalling the JDK: 1. Uninstall the JDK 2. Uninstall the JRE

Step 1:
cd /Library/Java/JavaVirtualMachines/

Step 2:
Get a list of the currently installed JDKs ls

Step 3:
Change the directory name below based on the JDK version you want to uninstall
sudo rm -rf jdk1.7.0_71.jdk

Step 4:
sudo rm -rf /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/

References: Uninstall Java Mac 2019

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