To uninstall AdoptOpenJDK installed via Homebrew,

brew uninstall adoptopenjdk8

To uninstall OpenJDK installed via Homebrew,

brew uninstall openjdk8
Answer from user5780831 on Stack Overflow
🌐
Mac Install Guide
mac.install.guide › java › uninstall
Uninstall Java on Mac · Mac Install Guide · 2026
$ brew uninstall --cask temurin $ brew uninstall --cask temurin@25 $ brew uninstall --cask zulu $ brew uninstall --cask corretto $ brew uninstall --cask oracle-jdk · To remove all Homebrew-managed Java packages at once, use this loop.
Discussions

macos - Removing Java 8 JDK from Mac - Stack Overflow
(Though, in case you didn't know, ... it on mac..!) ... Also consider installing jdk as a homebrew cask - (un)installing/upgrading then is a simple brew command. ... Seems like using Homebrew& Jenv to manage the installed Java version is the way to go. see hanxue-it.blogspot.ch/2014/05/… ... I found it useful to reference homebrew-cask java formulas on how they uninstall ... More on stackoverflow.com
🌐 stackoverflow.com
uninstallation - Uninstall Java version 11 mac - Stack Overflow
I want to uninstall just Java 11.0.2 and keep the second one. ... Sign up to request clarification or add additional context in comments. ... Or just toss that folder to the trash in the Finder. You will likely be prompted for an admin password. 2019-03-15T19:52:57.313Z+00:00 ... Using Homebrew in the terminal did it easily for me. The following: brew ... More on stackoverflow.com
🌐 stackoverflow.com
How to uninstall Java
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 More on reddit.com
🌐 r/MacOS
2
3
August 6, 2022
Uninstall java cask failing
I ran brew doctor, fixed as many issues as possible and retried my command. I understand that if I ignore these instructions, my issue may be closed without review. Trying to uninstall java, but it fails. It says it may require elevated privileges, but never actually asks for my password. More on github.com
🌐 github.com
10
June 18, 2017
🌐
Brightzheng100
brightzheng100.github.io › diary › howto-install-uninstall-java-on-macos
How to properly install / uninstall Java on macOS | The future is Bright
... 1sudo rm -fr /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin 2sudo rm -fr /Library/PreferencePanes/JavaControlPanel.prefPane 3sudo rm -fr ~/Library/Application\ Support/Oracle/Java ...
🌐
Oracle
java.com › mac_uninstall_faq
How do I uninstall Java on my Mac?
Note: To uninstall Java, you must have Administrator privileges and execute the remove command either as root or by using the sudo tool · Remove one directory and one file (a symlink), as follows:
🌐
GitHub
gist.github.com › greenstevester › 740b562bcc7910656b4e0465a84fdb0a
Uninstall Oracle Java on Mac OSX using the Terminal / Install AdoptOpenJDK using homebrew · GitHub
Uninstall Oracle Java on Mac OSX using the Terminal / Install AdoptOpenJDK using homebrew - gist:740b562bcc7910656b4e0465a84fdb0a
🌐
Javaprogramto
javaprogramto.com › 2021 › 11 › uninstall-java-mac.html
Uninstall Java on mac os with commands [Fixed] JavaProgramTo.com
November 19, 2021 - $ brew cask uninstall java $ brew cask uninstall caskroom/versions/adoptopenjdk8 $ brew cask uninstall adoptopenjdk8 · In this article, we've seen how to uninstall java from mac os using commands and home brew.
Find elsewhere
🌐
Super User
superuser.com › questions › 1772970 › can-not-uninstall-java-from-mac-m1
macos - Can not uninstall java from mac M1 - Super User
March 10, 2023 - Did you mean openjdk, openjdk@11, openjdk@17, openj9 or openjdk@8? rahul@doctor ~ % brew uninstall openjdk@19 Error: No such keg: /opt/homebrew/Cellar/openjdk@19 · While going through some other question, there mentioned to delete /Library/Java/JavaVirtualMachines but it does not exists in my system
🌐
MacPaw
macpaw.com › how to › optimization › apps
How to uninstall Java on Mac step by step
February 8, 2026 - 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.
🌐
Java With Us
javawithus.com › home › faq › how to uninstall java on mac
How to Uninstall Java on Mac | Java With Us
April 21, 2026 - Uninstall Java on Mac: brew uninstall for Homebrew installs, sudo rm -rf for pkg installs, and clean up JavaVirtualMachines and JAVA_HOME.
🌐
Oracle
java.com › en › uninstall › uninstall_instructions.html
Uninstall instructions for Java
The Add/Remove control panel displays a list of software on your system, including any Java software products that are on your computer. Select any that you want to uninstall by clicking on it, and then click the Remove button.
🌐
How-To Geek
howtogeek.com › home › linux & macos terminal › how to uninstall java on mac os x
How to Uninstall Java on Mac OS X
September 29, 2015 - You'll be presented with the message, "No Java runtime present, requesting install". And then a little dialog box will pop up with the OK button highlighted, indicating that everything is going to be OK now. We've also covered how to uninstall Java from your Windows computer if you want to do that.
🌐
DEV Community
dev.to › ruthvikraja_mv › how-to-uninstall-java-on-mac-104a
How to Uninstall Java on Mac? - DEV Community
February 1, 2022 - Hello everyone, There are two methods to uninstall Java on your Mac and they are as follows:- ...
🌐
Azul
docs.azul.com › core › uninstall › other-distributions
Uninstalling other OpenJDK distributions
HKEY_LOCAL_MACHINE\SOFTWARE\Ja... installed packages % brew list # Uninstall example, depending on the installed package, for example 'openjdk' % brew uninstall --formulae openjdk...
🌐
MacKeeper
mackeeper.com › blog › mac tutorials › how to uninstall java on a mac
How to Uninstall Java on a Mac
September 24, 2025 - Step 1. MacKeeper > Smart Uninstaller ... Click Remove · The most straightforward way to remove Java from a Mac is by using the Terminal command line....
🌐
Reddit
reddit.com › r/macos › how to uninstall java
r/MacOS on Reddit: How to uninstall Java
August 6, 2022 -

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?

The best I can figure is just to go into HD/Library/Java and just delete everything there. Slightly new to macOS so wondering if this is right. The installers themselves don't give any means of uninstalling.

🌐
Dev2QA
dev2qa.com › home › how to install / uninstall multiple java versions in mac os by home brew or manually
How To Install / Uninstall Multiple Java Versions In Mac OS By Home Brew Or Manually Windows Tricks
September 12, 2022 - $ ./openjdk-12.0.1.jdk/Content... Java HotSpot(TM) 64-Bit Server VM (build 12.0.1+12, mixed mode, sharing) Run homebrew cask command $ brew cask uninstall java to uninstall open JDK 12.0.1....
🌐
GitHub
github.com › Homebrew › homebrew-cask › issues › 35665
Uninstall java cask failing · Issue #35665 · Homebrew/homebrew-cask
June 18, 2017 - brew cask uninstall java --verbose --debug ==> Uninstalling Cask java ==> Uninstalling Cask java ==> Un-installing artifacts ==> Determining which artifacts are present in Cask java ==> 4 artifact/s defined #<Hbc::Artifact::Uninstall:0x007fc1af5f7df0> #<Hbc::Artifact::Pkg:0x007fc1af5f7da0> #<Hbc::Artifact::PostflightBlock:0x007fc1af5f7d28> #<Hbc::Artifact::Zap:0x007fc1af5f7cd8> ==> Un-installing artifact of class Hbc::Artifact::Uninstall ==> Running uninstall process for java; your password may be necessary ==> Removing launchctl service com.oracle.java.Helper-Tool ==> Executing: ["/bin/launchctl", "list", "com.oracle.java.Helper-Tool"] ==> Executing: ["/bin/launchctl", "remove", "com.oracle.java.Helper-Tool"] ==> Not privileged to remove service.
Author   Homebrew