A decade or so ago, applications that were developed using Java and needed a Java runtime environment to run on the Mac were fairly common. So common, in fact, that the Java runtime environment was preinstalled in macOS. These days, however, it’s unlikely that you’ll have to use Java, as most Mac apps are written using Apple’s Swift programming language and XCode developer tools. So, if Java is still installed on your Mac, you’ll probably want to uninstall it. We’ll show you how to do that in this article.
What is Java?
Java is both a development platform and a programming language. The platform includes the programming language, along with a compiler, a virtual machine, and a set of libraries. Years ago, lots of software that was made to be compatible on both Windows and Mac was written in Java because it was a simple way to make it work on both systems. While Java is no longer used very much to develop software for the Mac, it’s still in use in embedded systems.
Why uninstall Java on Mac?
It’s good practice to uninstall any software you don’t use. Not only does it free up space, but it also prevents any potential conflicts with other software in the future. As well as that, software which is installed on your Mac but isn’t updated regularly can be a security risk and an opportunity for malware distributors.
How to remove Java from Mac
There are a few different ways to uninstall Java on your Mac. Two of them are manual methods and involve either some detective work or using Terminal. The other one is very easy and needs only a couple of clicks. We’ll show you how to do all of them.
Uninstalling Java manually
This method requires locating Java-related folders and removing them from your system. Make sure to follow these steps:
- If you still have the Java installer, double-click it.
- If you don’t have the Java installer, you can download it here.
- When the installer opens, type in your Mac admin password.
- Click Remove and wait for it to uninstall.
- Check System Settings by clicking on the Apple menu and selecting System Settings.
- Look at the bottom of the sidebar. If the Java pane is still there, Control-click on it and choose ‘Remove Java Settings pane.’
- Click on the Finder icon in the Dock, then the Go menu and choose Go to Folder.
- Paste in each of the file paths below, one at a time, pressing Return afterward, and look for files or folders with ‘Java’ in their names. Drag them to the Trash.
/Library/Application Support/Oracle
/Library/Java/
/Library/Internet Plug-ins/
/Library/PreferencePanes - Empty the Trash.
Uninstalling Java via Terminal
If you prefer to use Terminal to remove Java from your Mac, here's how to do that:
- Go to Applications > Utilities and double-click Terminal to open it.
- Paste the commands below, one at a time, pressing Return after each one, into Terminal:
sudo rm -fr /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin
sudo rm -fr /Library/PreferencePanes/JavaControlPanel.prefPane
sudo rm -fr ~/Library/Application\ Support/Oracle/Java
rm -r ~/“Library/Application Support/Oracle/Java” - Quit Terminal
The easy way to uninstall Java from Mac
The easiest way to uninstall Java is to use an application designed to uninstall apps completely. We recommend CleanMyMac. It will track down all the files an application has placed on your Mac and remove them, leaving no trace of the app on your Mac. It can also remove leftovers from applications that weren’t uninstalled properly in the past. You can try CleanMyMac for free here. Once you’ve started your free trial, follow these steps to uninstall Java:
- Open CleanMyMac.
- Click Applications > Scan > Manage My Applications.
- Use the search bar to search for Java, or locate it in the list on the right pane.
- Select it and click Uninstall.

If you’ve previously tried to uninstall it, or any other application, and want to check for leftover files and remove them, follow the steps above and then choose Leftovers in the sidebar. Select the files and click Remove.
What if you can't uninstall Java on Mac
Uninstalling Java may seem straightforward, but you could run into issues that stop the software from being fully removed. These issues often include leftover files occupying disk space or system notifications suggesting Java is still installed. Let’s look at some of the most common issues during Java uninstallation and how you can solve them.
Leftover files after uninstallation
Even after following the standard uninstallation steps, certain Java-related files or folders may remain on your system. These files not only take up space but can also cause compatibility conflicts with future Java installations.
If you're unsure about manually locating all leftover files, consider using trusted third-party apps like CleanMyMac. It will scan your Mac for any associated files and help you remove Java completely.
Applications ask for Java after uninstallation
Some older apps, like Adobe software or Minecraft, might still ask you to install Java even after you've removed it. If you no longer use the app, it's best to uninstall it to stop the prompts. However, if you still need the app, you can reinstall Java and set it up to work only with that app.
Java is a development environment that includes a programming language, a compiler, runtime environment, and reference libraries. It was once quite common to see applications on the Mac that were written using Java, but it’s rarely used these days. Now, Java is most common in things like embedded systems. So, if you installed it on your Mac and no longer use it, you should uninstall it to free up space and prevent potential problems in the future. Follow the steps above to remove it from the Mac manually, using Terminal, or the easy way, using CleanMyMac.