Uninstall Old JDK from Mac Computer


How to uninsatll old JDK from my Mac computer? I don't need it any more.

✍: FYIcenter


If you want to uninstall JDK from your Mac computer, you can follow these steps:

1. Verify versions of installed JDK:

fyicenter$ ls -l /Library/Java/JavaVirtualMachines

drwxr-xr-x@ 5 root  wheel  170 Feb 13  2020 jdk-13.jdk
drwxr-xr-x@ 3 root  wheel  102 Mar  5  2020 jdk-14.0.1.jdk
drwxr-xr-x  3 root  wheel  102 Oct 12  2020 jdk-15.jdk
drwxr-xr-x  3 root  wheel  102 Nov  5 23:22 jdk-17.0.5.jdk

2. Remove older versions of JDK:

fyicenter$ sudo rm -rf /Library/Java/JavaVirtualMachines/jdk-13.jdk
fyicenter$ sudo rm -rf /Library/Java/JavaVirtualMachines/jdk-14.0.1.jdk/
fyicenter$ sudo rm -rf /Library/Java/JavaVirtualMachines/jdk-15.jdk/

3. Verify the latest version of JDK:

fyicenter$ javac -version
javac 17.0.5

fyicenter$ java -version
java version "17.0.5" 2022-10-18 LTS
Java(TM) SE Runtime Environment (build 17.0.5+9-LTS-191)
Java HotSpot(TM) 64-Bit Server VM (build 17.0.5+9-LTS-191, mixed mode, sharing)


JDK 17 JMod/Module Files

Java Deployment Personal Cache on Mac Computer

Using JDK 17 on Mac Computer

⇑⇑ FAQ for JDK (Java Development Kit) 17

2023-09-03, 308🔥, 0💬