Skip to content

Instantly share code, notes, and snippets.

@niw
Created May 28, 2013 22:30
Show Gist options
  • Save niw/5666651 to your computer and use it in GitHub Desktop.
Save niw/5666651 to your computer and use it in GitHub Desktop.
Remove risky Java plugin which installed by Oracle JDK package.
#!/bin/sh
# Remove a risky plug-in.
rm -rf "/Library/Internet Plug-Ins/JavaAppletPlugin.plugin"
# Remove symlink provided by the plug-in.
rm -f "/Library/LaunchAgents/com.oracle.java.Java-Updater.plist"
rm -f "/Library/LaunchDaemons/com.oracle.java.Helper-Tool.plist"
rm -f "/Library/PreferencePanes/JavaControlPanel.prefPane"
# Cleanup the package giving these.
pkgutil --forget com.oracle.jre
echo "Current JDK and JRE packages"
pkgutil --pkgs|grep -E '(oracle|jdk|jre)'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment