0

I would love to uninstall the current java I use on my mac to an older version, I cannot remember how I downloaded Java in the first place it might not have been from the website but via my company which is why some of the known options might not be working for me. How can I uninstall java 16 irrespective of how it was installed

  • Does this answer your question? [How do I uninstall the Java JDK in macOS?](https://stackoverflow.com/questions/51780530/how-do-i-uninstall-the-java-jdk-in-macos) – Anston Sorensen Aug 01 '21 at 17:18

1 Answers1

1

You can use the following command to delete the java version:

sudo rm -rf /Library/Java/JavaVirtualMachines/your-java-jdk

*** Note you can't undo this so be careful what file you pass as input!

Here's an article with multiple ways to do so: https://www.dev2qa.com/how-to-install-uninstall-multiple-java-versions-in-mac-os-by-home-brew-or-manually/

Likewise, you can follow that same path in the Finder to delete any of your installed JVMs manually. The Finder prompts for an admin password.

Basil Bourque
  • 303,325
  • 100
  • 852
  • 1,154
Manaswi
  • 36
  • 3