How to uninstall a specific java version from a mac?
When I execute the following command:
/usr/libexec/java_home -V
I see the following.
Matching Java Virtual Machines (2):
11.0.2, x86_64: "OpenJDK 11.0.2" /Library/Java/JavaVirtualMachines/openjdk-11.0.2.jdk/Contents/Home
1.8.0_202, x86_64: "Java SE 8" /Library/Java/JavaVirtualMachines/jdk1.8.0_202.jdk/Contents/Home
I want to uninstall just Java 11.0.2 and keep the second one.
Click Start, point to Settings, and then click the Control Panel. In the Control Panel, double-click the Add/Remove Programs. On the Install/Uninstall tab, click the Java version you want to uninstall, and then click Add/Remove.
The modular runtime image of JDK 11 contains the following folders: Note: In macOS, the JDK installation path is /Library/Java/JavaVirtualMachines/jdk-interim.
Run this command and it will remove the JDK
sudo rm -rf /Library/Java/JavaVirtualMachines/openjdk-11.0.2.jdk
sudo rm -rf /Library/Java/JavaVirtualMachines/jdk-11.0.5.jdk
Works for me
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With