How to Remove or Uninstall Java (JRE) on Windows and Mac

·
9 min read

Online Tech Tips is reader-supported. We may earn a commission when you buy through links on our site. Learn more.

If you’ve got Java sitting on your computer and you’re not sure why, you’re not alone. For years, Java was everywhere. Websites ran on it, apps needed it, and it felt like something you just had to have. But in 2026, most people don’t need Java at all anymore, and keeping an old, unpatched version around is a genuine security risk. The good news? Getting rid of it is easier than you might think.

In this guide, we’ll walk you through how to completely uninstall Java on both Windows 11/10 and modern macOS, step by step. We’ll also cover what to do if you only want to remove old versions but keep one current runtime around. Whether you have Oracle Java, OpenJDK, or a mix of both, we’ve got you covered.

Do You Actually Need Java Anymore?

Here’s the short version: probably not. The old Java browser plug-in, the thing that used to let websites run Java-powered content, is completely dead. Chrome, Edge, Firefox, and Safari dropped support for it years ago, and Oracle removed the browser plugin from Java 9 onward. So if you were keeping Java around “just in case a website needs it,” that’s no longer a thing.

That said, there are still some situations where Java is legitimately needed:

– Enterprise or legacy apps, some older business software still runs on Java

– Developer tools, IDEs like IntelliJ IDEA or Eclipse need a JDK (Java Development Kit) installed

– Specific utilities, certain tools (like some network scanners or database clients) still bundle Java

If none of those apply to you, go ahead and remove it. If something breaks afterward, it’ll usually tell you Java is missing and you can reinstall just what you need at that point.

Check What Java You Have Installed

Before you start uninstalling things, it’s worth taking a quick look at what’s actually on your machine. You might have more than one version, or more than one flavor, of Java installed. These days, Java comes in a few different forms:

  • Oracle Java Runtime Environment (JRE), the classic runtime, e.g., “Java 8 Update 451 (64-bit)”

– Oracle Java SE Development Kit (JDK), the developer version

– OpenJDK distributions, free, open-source Java from vendors like Adoptium (Temurin), Amazon Corretto, or Azul Zulu

You’ll want to remove all of them unless you specifically need one. These steps apply whether you have Java 8, 11, 17, 21, or any other version, just repeat the process for each entry you find.

How to Uninstall Java on Windows

On Windows 11

  1. Click the Start button and open Settings (or press Windows + I).

2. Click Apps in the left sidebar, then select Installed apps.

3. In the search box at the top, type Java. You may also want to search for JDK, JRE, Temurin, Corretto, or Zulu to catch any non-Oracle distributions.

4. For each Java entry in the list, click the three-dot menu on the right and select Uninstall.

5. Follow the prompts in the uninstaller wizard to complete the removal.

6. Repeat for every Java entry until none remain.

Windows 11 Settings > Apps > Installed apps with "Java" typed in the search box, showing one or more Java entries in the results list

On Windows 10

  1. Click Start and open Settings.

2. Click System, then select Apps & features.

3. Search for Java in the search box.

4. Click on each Java entry and hit Uninstall.

5. Follow the prompts and repeat for all Java versions listed.

Windows 10 Settings > Apps & features with Java listed and the Uninstall button visible

On Windows 8 or Windows 7 (Legacy)

If you’re still on an older version of Windows (no judgment!), the process goes through Control Panel instead:

  1. Open Control Panel and go to Programs > Programs and Features (on Windows 7) or search for “Control Panel” from the Start screen (on Windows 8).

2. Find any Java entries in the list, look for names like Java, Java SE, J2SE, or Java Runtime Environment.

3. Right-click each entry and select Uninstall.

4. Follow the prompts to complete the removal.

Remove Only Old Java Versions (Keep the Latest)

Maybe you don’t want to nuke Java entirely, you just want to clean up the outdated versions that are piling up. Oracle has a free tool for exactly this: the Java Uninstall Tool. It’s a Windows-only utility that scans your system for out-of-date Java versions and lets you remove them automatically while keeping your current one.

Oracle's Java Uninstall Tool download page at java.com/en/download/uninstalltool.jsp

Download and run the tool, and it’ll show you a list of outdated versions it found. Check the boxes next to the ones you want to remove and let it do its thing. It’s pretty painless, and a solid choice if you need to keep one current Java version for an app but want to clean up the old clutter.

Oracle Java Uninstall Tool showing a list of detected out-of-date Java versions with checkboxes to select for removal

How to Uninstall Java on macOS

Removing Java on macOS is a bit more hands-on than on Windows. There’s no one-click uninstaller, but don’t let that scare you off. It mainly involves running a few commands in Terminal (the Mac equivalent of Command Prompt). We’ll walk you through it.

First, a quick heads-up: on modern macOS, Java is stored as a bundle in /Library/Java/JavaVirtualMachines/. Each installed JDK or JRE lives in its own folder there. Removing Java means deleting those folders, plus a few extra files that some installers leave behind.

Step 1: Check What’s Installed

Open Terminal, you can find it by pressing Cmd + Space to open Spotlight and typing “Terminal”, or by going to Applications > Utilities > Terminal.

Once Terminal is open, type this command and press Return:

/usr/libexec/java_home -V

This will list all the Java versions currently installed on your Mac. If you get back a list of JDKs, those are what you need to remove. If it says “Unable to find any JVMs matching version” or similar, Java may already be gone (or only Apple’s stub remains, more on that in a moment).

macOS Terminal showing the output of /usr/libexec/java_home -V command, listing installed Java versions

Step 2: List the Installed Java Bundles

Run this command to see the exact folder names of your installed Java runtimes:

ls /Library/Java/JavaVirtualMachines

You’ll see folder names like jdk-21.jdk, temurin-17.jdk, or jre1.8.0_361.jre. Make a note of the ones you want to remove.

Step 3: Remove the Java Bundles

For each bundle you want to delete, run the following command, replacing with the actual folder name you saw in the previous step. Double-check the path before pressing Return — sudo rm -rf deletes permanently with no undo, and a mistyped path (or a stray space before the closing quote) can remove the wrong folder:

sudo rm -rf "/Library/Java/JavaVirtualMachines/<folder-name>"

You’ll be prompted to enter your Mac’s admin password. Type it in and press Return. (You won’t see the password as you type, that’s normal.) If the command runs without any output, it worked.

macOS Terminal showing the sudo rm -rf command being used to remove a Java JDK bundle from /Library/Java/JavaVirtualMachines

Step 4: Remove Leftover Files (If Present)

Some Java installers drop a few extra files on your Mac. Run these commands to check for and remove them if they exist:

Old browser plug-in (from older Java installs, probably not there on a modern Mac, but worth checking):

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

Java Control Panel preference pane (if you see a Java icon in System Settings):

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

Step 5: Verify Java Is Gone

Run this command to confirm:

/usr/bin/java -version

On modern macOS, you might see a pop-up saying “No Java runtime present, requesting install”. That’s actually fine and just means macOS is offering to install a JDK if you want one. If you don’t, just dismiss it. It doesn’t mean Java is still installed; it’s just Apple’s built-in stub checking in.

macOS Terminal showing the result of /usr/bin/java -version after Java removal, either showing "No Java runtime present" message or command not found

Tips and Troubleshooting

Common Issues

Problem: I uninstalled Java, but java -version still shows something in Windows

There’s probably another Java distribution still installed, maybe an OpenJDK build from a different vendor. Go back to Settings > Apps > Installed apps and search for “JDK”, “Temurin”, “Corretto”, or “Zulu” in addition to “Java”. Also open a new Command Prompt window and type where java to see exactly which executable is still being called.

Problem: Java won’t uninstall on Windows, the uninstaller fails or hangs

This can happen if the original installer got corrupted. Try this:

  1. Download and reinstall the exact same Java version that’s stuck.

2. Then try uninstalling it again through Settings > Apps.

3. If that still doesn’t work, Oracle recommends using the Microsoft Program Install and Uninstall troubleshooter to fix broken uninstaller entries.

Problem: An app broke after I removed Java

The app will usually tell you it needs Java and point you toward a download. Just reinstall the specific version it requires. You don’t have to bring back everything. For most modern apps, installing the latest Adoptium Temurin JDK (a free, open-source build) will do the trick.

Pro Tips

  • Multiple versions? Remove them all: Having several Java versions installed at once is more of a liability than a convenience. Unless a specific app requires a specific version, just remove everything and reinstall one current runtime if you need it.

– Keep it updated if you keep it: If you do need Java, stick to one supported, up-to-date version. Oracle releases regular security updates, and running an old version is the main risk. Remove old versions and keep only the latest LTS (Long-Term Support) release.

– Don’t delete /usr/bin/java on macOS: This is an Apple-provided stub, not the actual Java runtime. Deleting it won’t remove Java and can cause other issues. Removing the bundles from /Library/Java/JavaVirtualMachines is the right approach.

– Browser plug-in worry? Don’t bother: Modern browsers (Chrome, Edge, Firefox, Safari) don’t support the old Java plug-in at all. You don’t need to do anything special in your browser, it was already blocked long before you got here.

Wrapping Up

Removing Java is a solid move for most home users in 2026, especially if you’re not sure why it’s even there. The old browser plug-in security nightmare is long gone, but outdated Java runtimes still pose a risk if they’re just sitting around unpatched. On Windows, the built-in Settings app makes it pretty painless. On macOS, a few Terminal commands get the job done cleanly.

If something stops working after you remove it, don’t panic. Just reinstall the specific Java version that app needs and move on. It’s worth trying, and you can always undo it. If you’ve got questions or ran into a snag, drop a comment below!