Uninstall Oracle Java using the Terminal

Uninstalling Java with a Terminal

Note: To uninstall Java, you must have Administrator privileges and execute the remove command either as root or by using the sudo. 
Remove one directory and one file (a symlink), as follows:

  1. Click on the Finder icon located in your dock
  2. Click on the Utilities folder
  3. Double-click on the Terminal icon (Note: if you have trouble locating this, you can click the Spotlight Search icon, the magnifying glass near the clock. Type Terminal and It should be the first result)
  4. In the Terminal window Copy and Paste the command below:

    sudo rm -fr /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin
sudo rm -fr /Library/PreferencePanes/JavaControlPanel.prefpane

sudo rm -fr ~/Library/Application\ Support/Java

Do not attempt to uninstall Java by removing the Java tools from /user/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. 



Keywordsuninstall, java, terminial   Doc ID62676
OwnerCynthia S.GroupRice U
Created2016-04-12 10:16:50Updated2023-05-03 05:23:17
SitesRice University
Feedback  5   5