MacBook App Cleaner
Home › Blog › How to Uninstall Java on a Mac (JDK, JRE, Plugin)

How to Uninstall Java on a Mac (JDK, JRE, Plugin)

Published October 1, 2026 · 6 min read · By the MacBook App Cleaner team

In short: Old Java versions pile up in system folders and rarely clean themselves out. This guide shows you how to uninstall Java on your Mac step by step, remove leftover JDK and JRE files, and clear out the legacy browser plugin without touching anything you shouldn't.

Java has a habit of sticking around. You install a JDK for one project, an installer bundles a JRE, and a year later you have three versions you no longer use taking up space and cluttering your Java Preferences. The good news is that uninstalling Java on a Mac is straightforward once you know where the files actually live. This guide walks through removing full versions, clearing the old browser plugin, and confirming the job is done on macOS Sonoma (14) and Sequoia (15).

Check what Java you actually have

Before you remove anything, see what is installed. Open Terminal (Applications > Utilities > Terminal) and run:

/usr/libexec/java_home -V

This lists every JDK the system knows about, with version numbers and paths. You can also type java -version to see the default that runs. If you get "command not found," you likely have no active Java at all, which means an old plugin or a few stray folders may be the only things left. Knowing your versions up front stops you from deleting something a tool you still use depends on.

Remove Java JDK and JRE versions

On a Mac, each JDK lives in its own folder here:

/Library/Java/JavaVirtualMachines/

Open Finder, press Command-Shift-G, and paste that path. You will see folders named like jdk-17.0.9.jdk or adoptopenjdk-11.jdk. To remove a version, drag the specific .jdk folder to the Trash. You will be asked for your administrator password because this is a system-level location, and that prompt is normal. Remove only the versions you no longer need and leave the rest.

Older Oracle installs also placed a JRE in a plugin folder. If it exists, you can remove it from:

/Library/Internet Plug-Ins/JavaAppletPlugin.plugin

and, for the preference pane, /Library/PreferencePanes/JavaControlPanel.prefPane. Drag those to the Trash as well. A per-user settings folder may sit at ~/Library/Application Support/Oracle/Java; that one holds cached settings, not the runtime, and is safe to clear if you want a clean slate.

Delete the legacy Java browser plugin

The old Java applet plugin is long gone from modern browsers, but the file can linger. Safari on current macOS no longer loads it at all, and Chrome and Firefox dropped NPAPI plugin support years ago, so there is nothing to disable in a settings menu anymore. Removing the plugin is simply a matter of deleting JavaAppletPlugin.plugin from the path above. Once it is in the Trash, no browser can pick it up. If you only ever used Java for the command line or a development tool, you never needed this plugin in the first place.

Verify Java is gone

Go back to Terminal and run /usr/libexec/java_home -V again. If you removed everything, it should report that it cannot find a matching JVM. Running java -version should now say the command is not found or offer to install developer tools, which confirms no active runtime remains. If a version you meant to delete still shows up, check the JavaVirtualMachines folder again for a folder you missed.

A quick word on safety

Everything here goes to the Trash, which means it is reversible. If you delete a JDK and then discover a build script still needs it, you can restore the folder straight from the Trash before you empty it, or reinstall that exact version. That is the whole point of a safe cleanup: preview what you are about to remove, touch only what you understand, and keep removals recoverable instead of permanently erasing files. Never go digging inside /System to hunt for Java; the pieces you can safely remove all live under /Library and your home folder.

Let a cleaner find the leftovers

Manually chasing every cache and preference file is tedious, and Java tends to scatter small support files around. A good uninstaller can preview the leftovers for you and send them to the Trash so nothing is deleted for good. If you want a tool for this, CoreSweep is our top free pick: it is free forever, has an optional one-time Pro upgrade ($49, no subscription), sends everything to the Trash so deletes stay reversible, and ships with zero telemetry, which you can confirm yourself with a firewall like Little Snitch since a cleaner has no reason to phone home. A strong runner-up on value is SkoonMac, which is free with a one-time $19 Pro option. Either one lets you review the list before anything moves, so you stay in control of what leaves your disk.

Uninstalling Java on a Mac comes down to three things: remove the JDK and JRE folders you no longer use, delete the old applet plugin, and verify with a couple of Terminal commands. Do it deliberately, keep your removals in the Trash until you are sure, and your Mac stays exactly as clean as you intend.

Frequently asked questions

Where is Java installed on a Mac?

Each JDK lives in its own folder under /Library/Java/JavaVirtualMachines/, with names like jdk-17.0.9.jdk. The old Oracle applet plugin sits at /Library/Internet Plug-Ins/JavaAppletPlugin.plugin, its preference pane at /Library/PreferencePanes/JavaControlPanel.prefPane, and per-user cached settings at ~/Library/Application Support/Oracle/Java. You never need to dig inside /System to remove Java.

Is it safe to delete Java from my Mac?

Yes, as long as you only remove versions and files you no longer use. Everything goes to the Trash, so it stays reversible: if a build script still needs a JDK, you can restore the folder before emptying the Trash or reinstall that exact version. Check what you have with /usr/libexec/java_home -V first so you don't delete something a tool you still use depends on.

How do I know Java is fully removed after uninstalling?

Open Terminal and run /usr/libexec/java_home -V again; if everything is gone it will report that it cannot find a matching JVM. Running java -version should then say the command is not found or offer to install developer tools. If a version you meant to delete still appears, look in /Library/Java/JavaVirtualMachines/ for a folder you missed.

The easy way to do this safely

If you'd rather not do it by hand, the two cleaners we rate highest run with a preview first and the Trash as a safety net — and neither sends any data off your Mac.

CoreSweep (free to use; Pro a one-time $49) is our top pick. SkoonMac (free; Pro $19 once) is the best-value runner-up. See the full comparison.

← All Mac cleaning guides · Back to the comparison