How to Uninstall Java on a Mac

Jun 16, 2017 - 19 Comments

How to uninstall Java from Mac OS

Many Mac users don’t need Java on their computer, but if you happen to have Java installed and want to remove it from a Mac then you can uninstall Java and JRE with a little effort.


Uninstalling Java and JRE from the Mac is a little more complicated than installing it, as there is no dedicated uninstaller app or tool, and it’s not as simple as uninstalling other Mac apps since the components are split into different locations. Instead you’ll either turn to the command line, or dig around in the Finder and file system yourself to remove Java in Mac OS. We’ll show you how to remove java using both methods.

Note that by removing Java you will lose the ability to run any and all Java apps or Java dependent apps and applets, either individually, standalone, or via the web. You would obviously not want to uninstall Java if an app or web app you use requires Java. An alternative option would be to simply disable Java instead, which turns it off but does not remove it from the computer.

Uninstalling Java on the Mac

Removing Java from the Mac is a three step effort involving manually deleting various java related plug-ins and files found throughout macOS / Mac OS / Mac OS X, both in the system /Library folder and in the users ~/Library folder. You should always back up your Mac before removing any item found within a system directory. Here is what you’ll want to do and look for via the Finder:

  1. Quit out of any active web browser or any other app which uses Java
  2. From the Mac Finder, pull down the “Go” menu and choose “Go To Folder” and enter the following path:
  3. /Library/Internet Plug-ins/

  4. Locate and delete “JavaAppletPlugin.plugin” from this folder – note moving this item to the trash requires an admin login
  5. Find and remove Java plugin on Mac to uninstall Java

  6. Now go back to the ‘Go’ menu and “Go To Folder” and enter the following path:
  7. /Library/PreferencePanes/

  8. Locate and delete “JavaControlPanel.prefPane” from this folder, again you will need an admin login
  9. Again return to the “Go” menu and “Go To Folder” to the following path:
  10. ~/Library/Application Support/Java/

  11. Remove the “Java” folder
  12. Empty the Trash on the Mac as usual

Java will be removed completely this way.

The Finder based approach is the easier and safer way to uninstall Java from a Mac, though Mac users can also remove Java and JRE via the command line as well.

Uninstalling Java and JRE from Mac OS Command Line

You can also uninstall Java from the command line by using the rm command, this is aimed for advanced users who understand the ramifications of using rm with superuser privileges. This is not for novice users, using the command line requires precise syntax and failure to use proper syntax may result in erroneous commands or unintended data loss.

One by one, execute each of the following commands individually:

sudo rm -rf "/Library/Internet Plug-Ins/JavaAppletPlugin.plugin"

sudo rm -rf "/Library/PreferencePanes/JavaControlPanel.prefPane"

sudo rm -rf "~/Library/Application Support/Java"

This requires authenticating with sudo. Be certain you have the syntax 100% correct, if you are not sure if the syntax is correct do not execute the commands, and instead you’d likely want to use the Finder based approach of uninstalling java instead.

Note that whether you uninstall Java and JRE by command line or by the Mac Finder GUI, the result is the same, you are specifically removing the Java plugins, control panels, and application support for Java from the Mac.

You can always reinstall Java onto the Mac again at a later point if you decide to, or determine it’s necessary. Most Mac users do not need Java on their computers and thus won’t need to install it.

Enjoy this tip? Subscribe to the OSXDaily newsletter to get more of our great Apple tips, tricks, and important news delivered to your inbox! Enter your email address below:

Related articles:

Posted by: Paul Horowitz in Mac OS X, Tips & Tricks, Troubleshooting

19 Comments

» Comments RSS Feed

  1. david watts says:

    … after reading through this post, I am still confused. I still don’t know why it might be useful to remove or disable Java. Can anyone shed some light on this for me?

  2. ej23 says:

    Is java bad?

  3. Trang says:

    Please specify what Java does and does not, and if my Mac needs it, how could I figure it out.
    My Mac has Software OS X 10.9.5 (13F1911). Thanks.

  4. diane says:

    Awesome!

    I’m sick of getting Java upgrade notices. Copy/Paste on the command line couldn’t have been easier. Thanks for posting this.

  5. Ogles of Kansas says:

    If you don’t need java don’t install it. Just like you wouldn’t clutter up with other stuff you don’t need.

    Plus java is sometimes a security risk so what is the point of keeping it if you don’t need it for a specific app? Even then you have to keep it updated to maintain it.

    • david watts says:

      … that makes sense, I suppose. Except in the twenty plus years I’ve used my Macs, I have had Java installed for all its usual purposes and can’t recall one instance of being asked to do a manual upgrade. I assume it’s still there and working but if not, I guess I don’t need it.

  6. Patrick in Guelph says:

    I use an app called Appdelete, which works very well at removing all of the bits & pieces that many apps install. Do you know if Appdelete would work as thoroughly as you describe for Java?

    • Serge says:

      AppDelete should be able to do the job. But since Java is not an “application” you have to go to /Library/PreferencePanes/ and from there, you can drag JavaControlPanel.prefPane on AppDelete window.

  7. Thomas says:

    On my Mac’s there is also a Java direction at:
    $ /Library/Java/…

    • Mar Maunt says:

      The Java plugin is always contained within “/Library/Internet\ Plug-ins/” or “~/Library/Internet Plug-ins/”

      If you don’t know what you’re doing you should not install Java in the first place. You do not need it.

      • Thomas says:

        The topic is “How to Uninstall Java on a Mac” and not “How to Uninstall Java Plug-in on a Mac”.
        BTW the how to belongs only to the JRE, but there is also a JDK….

    • DCJ001 says:

      “On my Mac’s there is also a Java direction at:
      $ /Library/Java/…”

      On your Mac’s what?

      Never mind. I now realize that you are one of those people who uses apostrophes when pluralizing nouns instead of showing possession or substituting for letters in contractions – can’t, don’t, etc.

  8. expobill says:

    for you kids at home, CS photoshop users need java to run the program, or something similar, so just be careful out there.
    -don cheery

  9. Ed Rush says:

    I have just the opposite problem — getting Java to work reliably. I generally only want it for the Newsday and syndicated NY Times crossword puzzles, but it comes and goes on various browsers — Firefox, Chrome, Opera, and Safari. Currently it is working sometimes on Safari, sometimes not. Is there some other Mac browser that lets Java work more consistently?

  10. ET says:

    I’ve been having an ongoing issue with java where, upon starting the computer, it will insist that I update it (I think–been a long time since I read it). These demands will occur from 1-6x and I can do nothing until I keep hitting return. Tried re-installing/updating some months ago to no avail.

    I hope this works because I detest this program and, since I am not someone who is able to easily deal with these things, want it GONE forevermore.

    • ET says:

      Well, it did not work. Poking around in LaunchAgents, I found “com.oracle.java.java-Updater.plist”. Seems as though I should trash this POS also. Found more java crapola in Preferences. Dumped all those. Next startup should be interesting.

  11. MIchael S says:

    When upgrading to later OS X, I have an(a) app on my computer that requires Legacy Java. I wish I could find out which one it is because it is the only reason why I continue to reinstall Legacy Java. Does anyone know how to find what app requires it????

  12. MIchael S says:

    When upgrading to later OS X, I have an(a) app on my computer that requires Legacy Java. I wish I could find out which one it is because it is the only reason why I continue to reinstall Legacy Java. Does anyone know how to find what app requires it?

Leave a Reply

 

Shop for Apple & Mac Deals on Amazon.com

Subscribe to OSXDaily

Subscribe to RSS Subscribe to Twitter Feed Follow on Facebook Subscribe to eMail Updates