June 6, 2025
How to Uninstall Java on Mac
Stuck trying to delete Java versions from your Mac? You’re in the right place. We’re here to help you go all the way with your Java uninstallation attempts 😉.
In this step-by-step guide, we come up with four options and possible workarounds on how to remove Java from a Mac entirely.
This article contains:
Attention Spoiler!
The fastest and most reliable method is using App Cleaner & Uninstaller – a Java uninstall tool on Mac designed to remove apps like Java completely in just a few clicks.
What is Java?
Java is a popular programming language and open-source platform used to build cross-platform applications. It powers everything from business tools to web services, often through the Java Development Kit (JDK) or Java Runtime Environment (JRE).
Fun fact:
According to a 2024 report by New Relic, Java 17 became the most popular LTS version with 35.4% adoption rate, nearly 3 times higher than in 2023 (9.1%) which means that 35.4 % of applications are now using Java 17 in production, followed by Java 11 at 32.9%, then Java 8 at 28.8%.
Video Guide: How to Delete Java on macOS
1:39
Do I need Java on my Mac?
Although Java has been around for 29 years as of 2025, it’s still widely used in development, with over 90% of Fortune 500 companies relying on it.
However, even if you’re building apps using the JDK or working in a Java-based development environment, you might still decide to:
- Switch to another language – you may be moving to Swift, Python, or JavaScript and no longer need Java.
- Fix compatibility issues – you may need to remove it to prevent any potential conflicts with other software.
- Clean up older versions – for instance, you installed the beta and now want to change the version.
Also, you might want to uninstall Java for:
- Security risks: Java has a history of security vulnerabilities, making it a potential target for cyberattacks and malware. One of the most common threats, SQL injections, gives hackers access to your queryable information. This can potentially let them steal, destroy, or corrupt your database. In this case, you might need to uninstall MySQL on your Mac, as well.
- System slowdowns: Java can hog memory and drag performance down. Background Java processes can consume memory and CPU, which might be one of the reasons that slow your Mac down.
- Accidental installation: Sometimes Java comes bundled with other apps. If you didn’t install it intentionally, it’s safe to remove.
Four options to delete Java from Mac
Whatever the reason, we are at your service to help you figure out how to uninstall Java safely and completely. While official uninstall instructions by Java give only one method, we prepared the four main methods so you can choose the one that best fits your situation and comfort level.
Here is the comparison:
Method | User Level | Removes Hidden Files | Risk of Mistakes | Recommended When… |
---|---|---|---|---|
Manual (System Settings) | Beginner | ❌ No | Low | You only want to remove the Java control panel |
Installer Method | Intermediate | ❌ Partial | Low | You have the original .pkg file |
Terminal Commands | Advanced | ✅ Yes (with care) |
Medium–High | You’re comfortable using Terminal |
App Cleaner & Uninstaller | All levels | ✅ Yes (thoroughly) |
Very Low | You want a safe, fast, and complete removal |
How to delete Java manually from System Settings
Java isn’t a typical app, so you won’t find it in your Applications or Launchpad. Instead, you can locate it through System Settings. Here is how to find it:
- Click on the Apple icon from the Apple menu in the top-left corner of the screen.
- Select the System Settings from the dropdown list.
- Scroll down the System Settings list of the sidebar and control-click on Java.
- Choose the Remove Java Settings pane.
Remove leftover files manually. For this, open Finder → press Command + Shift + G:
- In the search field, type and hit Return.
~/Library
Copy
- In the Library folder, double-check the following directories and drag any Java-related files to the Trash, if any:
Main
/Library/Internet Plug-Ins/JavaAppletPlugin.plugin
Copy
Caches
/private/var/db/receipts/com.oracle.jdk-13.0.2.bom
Copy
/private/var/db/receipts/com.oracle.jdk-13.0.2.plist
Copy
~/Library/Caches/net.java.openjdk.cmd
Copy
~/Library/Saved Application State/net.java.openjdk.cmd.savedState
Copy
~/Library/Caches/Oracle.MacJREInstaller
Copy
/private/var/db/receipts/com.oracle.jre.bom
Copy
/private/var/db/receipts/com.oracle.jre.plist
Copy
~/.oracle_jre_usage
Copy
Library
/Library/Java/JavaVirtualMachines/jdk-13.0.2.jdk
Copy
Application Support
~/Library/Application Support/Oracle
Copy
/Library/Application Support/Oracle
Copy
~/Library/Application Support/JREInstaller
Copy
/Library/Application Support/JREInstaller
Copy
~/Library/HTTPStorages/Oracle.MacJREInstaller
Copy
~/Library/Preferences/com.apple.java.util.prefs.plist
Copy
Preferences
~/Library/Preferences/com.oracle.java.Helper-Tool.plist
Copy
/Library/Preferences/com.oracle.java.Helper-Tool.plist
Copy
~/Library/Preferences/com.oracle.javadeployment.plist
Copy
~/Library/Preferences/com.oracle.java.JavaAppletPlugin.plist
Copy
Logs
/private/var/log/jreinstall.log
Copy
- Empty the Trash.
That’s it. You nailed it 😎
How to uninstall Java using its installation file
Next, you can uninstall Java on macOS with its installer. This method works if the installer is still available and you didn’t delete it after installation. If so, our tip here is that you can download the installation file again from Oracle’s site, but make sure you are about to download the same version as installed.
Now, let’s assume you have the installer. The Java uninstallation process will look like this:
- Locate the Java .dmg file in your Downloads folder.
- Click on the installer.
- Click on the package file.
- Enter your Mac admin password, if permission is required to continue.
- Click on the Remove button.
You’ll get a message confirming Java has been removed.
- Clean up leftovers as per the manual removal steps above.
Important!
Even when Java reports it’s been deleted, it quietly leaves behind leftover files. To find out exactly what you need to double-check and remove, refer to step 5 in the How to delete Java manually from System Settings section.
That’s all. The end 🤗
How to uninstall Java from Mac with Terminal
Another way to uninstall Java on Mac is to use a special command in Terminal. Terminal is a default macOS application that you can find in the Launchpad or in the Applications folder. If you are comfortable using the command line, here is how to delete Java on Mac:
- Open Finder → go to the Applications folder → Utilities.
- Run Terminal.
Alternative way: press Command + Space → type Terminal → push Enter.
- Check out your Java version by entering the following command:
java -version
Copy
- Remove Java Virtual Machine (JVM) by entering the following command:
sudo rm -rf /Library/Java/JavaVirtualMachines
Copy
- Remove Java Plug-in by entering the following command:
sudo rm -rf /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin
Copy
- Remove Java Control Panel (Preferences Pane) by entering the following command:
sudo rm -rf /Library/PreferencePanes/JavaControlPanel.prefPane
Copy
- Remove the Oracle Application Support folder by entering the following command:
sudo rm -fr ~/Library/Application Support/Oracle/Java
Copy
- Verify Removal by entering the command:
java -version
Copy
All done. Finito 🤌
How to uninstall Java using App Cleaner & Uninstaller
If you want to skip the technical steps and just get it done without any leftovers, then App Cleaner & Uninstaller is for you. By downloading this tool, you only win. It’s a safe, reliable tool that finds all Java-related files and removes all of them in a few clicks – no digging around in folders.
So, after downloading and launching the tool, here are a couple of simple steps to follow:
- Click on the Extensions tab from the sidebar.
- Go to Settings Panes → select Java
- Click on the Remove button → confirm.
- Go to Internet Plugins → select Java → click on the Remove button → confirm the action.
- Go to the Installation Files → select Java → click on the Remove button → confirm the removal.
Congratulations🎉 Case closed!
Thus, when using App Cleaner & Uninstaller, there are only pros:
- It is the fastest and easiest method;
- It removes all related files, including hidden and service files;
- It is good for beginners and non-tech-savvy users;
- It works even if you don’t know where Java was installed;
- There are more features to manage apps.
What if you can’t uninstall Java on Mac? How to fix it?
Sometimes things go wrong, and you just can’t remove Java. Understandable. That’s why we cover some dead-end situations where standard uninstallation methods fail – whether it’s a missing installer, broken links, or leftover files that won’t go away.
Case #1: The issue occurred when uninstalling all Java versions from Mac.
That’s what the user was worried about:
I’ve been trying to uninstall all java versions from my Mac by following:
% cd /Library/Java/JavaVirtualMachines
When I did ls into JavaVirtualMachines, I saw that there are no folders/ java versions available. However, when I do java –version, there is still a OpenJDK installed on my Mac:
openjdk 11.0.17 2022-10-18 LTS
OpenJDK Runtime Environment Corretto-11.0.17.8.1 (build 11.0.17+8-LTS)
OpenJDK 64-Bit Server VM Corretto-11.0.17.8.1 (build 11.0.17+8-LTS, mixed mode)
which java returns /usr/bin/java
Any advice on how I can uninstall this openJDK version?
Solution
/Library/Java/JavaVirtualMachines/
Copy
rm -rf corretto-11.0.17
Copy
Case #2: The problem connected with handling several JDK versions and uninstalling Java.
That’s what the user was worried about:
I installed several versions of the JDK, both official and open source. But I no longer need them. How exactly do you “uninstall” Java on macOS?
Suggestion
I did this to remove Oracle JDK 8.
https://www.java.com/en/download/help/mac_uninstall_java.html
For OpenJDK, it looks like you just have to delete the JDK directory.
https://www.codejava.net/java-se/uninstall-jdk-on-macos
In our experience, using Terminal commands or a dedicated Java uninstall tool like App Cleaner & Uninstaller can help force a complete and safe removal.
Final thoughts
It turned out that removing Java from a Mac can be more complicated than expected, especially when dealing with multiple JDK versions, hidden files, and leftover system components. But with a smart tool like App Cleaner & Uninstaller, deleting or managing Java and other apps becomes fast, simple, and effortless – like a hack if digging through system folders is not your thing.
If something is still unclear, drop us a line. We will not leave you alone with uninstallation and any other tech problems!
Great goods from you, man. I’ve take note your stuff prior to and you are just extremely fantastic. I really like what you have received right here, really like what you are saying and the way by which you assert it. You are making it enjoyable and you continue to take care of to stay it wise. I can not wait to learn far more from you.