Oh, I just figured it out :) Just go to your Library -> Java -> JavaVirtualMachines and there it will be the JDK and openJDK folders, just move the openJDK folder to the trash and it will go back to the original JDK, when you type in your terminal java -version you’ll see.

Answer from Tibério on Stack Exchange
🌐
MacPaw
macpaw.com › how to › optimization › apps
How to uninstall OpenJDK: Mac user guide
January 10, 2025 - Type the following, replacing [name of OpenJDK folder] with the name of the OpenJDK folder: sudo rm -rf [name of OpenJDK folder] Press Return. Enter your admin password followed by Return.
🌐
Azul
docs.azul.com › core › uninstall › other-distributions
Uninstalling other OpenJDK distributions
Depending on your software packaging and deployment system, different commands can be used on macOS and Linux. # Check all the installed packages % brew list # Uninstall example, depending on the installed package, for example 'openjdk' % brew uninstall --formulae openjdk
Discussions

macos - How to uninstall java from mac completely? JRE and JDK - Stack Overflow
But my terminal shows I have some version of java, so I am a little confused, I wanna uninstall java completely from my laptop. I did uninstall JRE too using a set of commands. ... openjdk version "1.8.0_152-release" OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01) OpenJDK 64-Bit Server VM (build 25.152-b01, mixed mode) ... @JohnGilmer which java may be useful in some cases, but e.g. on my system it returns /usr/bin/java, which is macOS... More on stackoverflow.com
🌐 stackoverflow.com
java - uninstall openjdk in mac - Stack Overflow
But my terminal shows I have some version of java, so I am a little confused, I wanna uninstall java completely from my laptop. I did uninstall JRE too using a set of commands. ... openjdk version "1.8.0_152-release" OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01) OpenJDK 64-Bit ... More on stackoverflow.com
🌐 stackoverflow.com
What is the best way to remove openjdk - Apple Community
There are many utilities that can uninstall applications. Here is a selection: ... The XLab FAQs and read the FAQ on removing software. ... I appreciate the response, it's very thorough. The JDK I have is not Oracle's, but OpenJDK which is an open source version of it. Will all of the same info apply or will it be different because it's not Oracle? ... Sorry, I thought you meant Oracles OpenJDK. I don't know where the other stores their Virtual Machines... More on discussions.apple.com
🌐 discussions.apple.com
java - How to uninstall JDK on Mac OS? - Stack Overflow
Folks - I am facing challenges while trying to uninstall JDK from my MAC (macOS High Sierra Version 10.13.4 - 17E199). I have two JDK instances installed and I want to uninstall both of them. I am More on stackoverflow.com
🌐 stackoverflow.com
🌐
Mac Install Guide
mac.install.guide › java › uninstall
Uninstall Java on Mac · Mac Install Guide · 2026
Homebrew formula installations create symlinks that may persist after uninstallation. Remove any remaining symlinks: $ sudo rm -f /Library/Java/JavaVirtualMachines/openjdk*.jdk · Check for leftover symlinks in the Homebrew opt directory: ... On Intel Macs, check /usr/local/opt/ instead of /opt/homebrew/opt/. Use manual removal for Java installed from Oracle downloads, vendor installers, or any method other than Homebrew. This approach gives you precise control over what gets deleted. Open a terminal application and change to the Java installation folder:
🌐
iMyMac
imymac.com › powermymac › uninstall adoptopenjdk on mac: follow these steps
Uninstall AdoptOpenJDK on Mac: Follow These Steps
August 12, 2024 - To use the Terminal to remove Java ... before, you can also uninstall AdoptOpenJDK on Mac using the commands such as: brew uninstall openjdk8 or brew uninstall adoptopenjdk8...
🌐
CodeJava
codejava.net › java-se › uninstall-jdk-on-macos
How to Completely Uninstall JDK on macOS
April 29, 2022 - In this quick post, I’d like to share with you how to uninstall JDK entirely from macOS operating system. If you have a JDK installation that was installed by Oracle JDK installer, you need to find the JDK directory in the/Library/Java/JavaVirtualMachines path. Open a terminal window, change the current directory:
🌐
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 - $ brew cask uninstall java ==> Uninstalling Cask java ==> Backing Generic Artifact 'openjdk-12.0.1.jdk' up to '/usr/local/Caskroom/java/12.0.1,69cfe15208a647278a19ef0990eea691/jdk-12.0.1.jdk'. Password: ==> Removing Generic Artifact '/Library/Java/JavaVirtualMachines/openjdk-12.0.1.jdk'.
Find elsewhere
🌐
javathinking
javathinking.com › blog › how-to-uninstall-java-from-mac-completely-jre-and-jdk
How to Uninstall Java Completely from Mac (JRE & JDK): Fix OpenJDK Still Showing in Terminal — javathinking.com
By following these steps, you’ll completely uninstall Java (JRE/JDK) from your Mac and resolve issues with lingering OpenJDK versions in the terminal.
🌐
Stack Overflow
stackoverflow.com › questions › 68737022 › uninstall-openjdk-in-mac
java - uninstall openjdk in mac - Stack Overflow
In Terminal.app (or any such console), type and execute: ... You will see the path to the java executable. Tip: I find the easiest way to locate, download, install, uninstall, and set default JDK is with SDKMAN!.
🌐
Apple Community
discussions.apple.com › thread › 251661762
What is the best way to remove openjdk - Apple Community
I think they are referring to the downloaded application, not the JDK. Nevertheless, it is conceivable that deleting the application will also delete the JDK. If it does not, then you will need to search Oracle's site for an uninstaller or ask their tech support how the JDK can be removed.
🌐
Osx Uninstaller
osxuninstaller.com › uninstall-guides › remove-openjdk
How do I Completely Remove OpenJDK from macOS and Mac OS X?
November 27, 2018 - Step 2. Then, the uninstaller will analysis the target app as fast as in a few seconds later, click the button “Complete Uninstall” when all the related folders and flies appeared in the list. Step 3. The tool will easily delete all the related folders and flies scanned in Step 2, now press Back to Step 1 and click Refresh, OpenJDK is gone from the list. Now, OpenJDK is gone for good in your macOS computer, you don’t have to worry about the remaining issue on the hard drive.
🌐
Nektony
nektony.com › home › blog › how to uninstall java on a mac completely
How to uninstall Java on Mac - Detailed steps
July 14, 2025 - 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.
🌐
Sahr Thomas Acton
actonnotes.wordpress.com › 2020 › 11 › 22 › how-to-remove-openjdk-version-15-on-apple-macos
How to remove openjdk version “15” on apple macOS
November 22, 2020 - 3. navigate to the folder where JavaVirtualMachines is installed “cd /Users/user1/Library/Java/“ 4. remove it. sudo rm -fr JavaVirtualMachines/* Please note that this command will remove all JavaVirtualMachines on your machine 4.1 – Type ...
🌐
Iboostup
iboostup.com › how-to-uninstall › net.java.openjdk.jdk
How to uninstall OpenJDK 16 by Java from your Mac
- Click on "Move to Bin" (or "Move to Trash" on older versions of macOS) - Open the macOS Terminal from Applications > Utilities. - Type killall libjli.dylib, hit ENTER - Type rm -rf "/Applications/OpenJDK 16.app", then hit ENTER.
🌐
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
🌐
UninstallMacApp
uninstallmacapp.com › openjdk-7-for-os-x-lion-removal.html
Remove OpenJDK 7 for OS X Lion from Mac system - Howto Guide
Download Mac App Remover · When installed, OpenJDK 7 for OS X Lion creates files in several locations. Generally, its additional files, such as preference files and application support files, still remains on the hard drive after you delete OpenJDK 7 for OS X Lion from the Application folder, in case that the next time you decide to reinstall it, the settings of this program still be kept. But if you are trying to uninstall OpenJDK 7 for OS X Lion in full and free up your disk space, removing all its components is highly necessary.