+3 votes
251 views
in Mac by (242k points)
reopened
Uninstall Java JDK macOS Monterey | Big sur

1 Answer

+4 votes
by (1.6m points)
edited
 
Best answer

How to uninstall Java JDK on macOS Big Sur or Monterey

Java JDK (Java Deployment Kit) is made up of a specific set of utilities with which the Java functions work in a much more complete way. This allows you to create and develop applications, websites and elements that are based on Java, in JDK we find the JRE plugin so that all processes on the network are safe and functional..

 

JDK is available in different versions and we may make the decision to use another language and other tools to manage this type of object on our Mac computers, for this reason it is advisable to uninstall JDK in macOS Big Sur or Monterey so that it does not conflicts are caused when creating and running applications, let's see how to achieve this.

 

 

 

To stay up to date, remember to subscribe to our YouTube channel!   SUBSCRIBE

 

How to uninstall Java JDK on macOS Big Sur or Monterey

 

Step 1

We open the terminal in macOS, in the terminal we are going to check the Java directory with the command:
 which java 

image

 

 

Step 2

This directory cannot be deleted since it is part of the operating system, now we will go to the Java management directory using cd:
 cd / Library / Java / JavaVirtualMachines / 
image

 

 

Step 3

There we are going to list the JDKs available with "ls":

 

image

 

Step 4

In this case we have version 16 of the JDK, to eliminate this JDK or those that are available, we will use the following syntax:
 sudo rm -rf jdk - ##. #. ". jdk 

image

 

Step 5

We enter the password to apply the changes:

 

image

 

Step 6

With "ls" you validate that the JDK has been removed in macOS:

 

image

 

Step 7

This is all we need to do to remove the JDKs on macOS. As an extra point getFastAnswer will give you some tips:

 

JDK delete options

 

To eliminate all the JDK we execute:

 sudo rm -rf "/ Library / Java / JavaVirtualMachines 
To remove the Java Applet plugin we will execute:
 sudo rm -rf "/ Library / Internet Plug-Ins / JavaAppletPlugin.plugin 
To remove the Java Control Panel we will use:
 sudo rm -rf "/Library/PreferencePanes/JavaControlPanel.prefPane 
To eliminate the caches associated with Applet, Web Start and the installation we will execute:
 sudo rm -rf "/ Library / Application Support / Oracle / Java sudo rm -rf" / Library / Application Support / Java 

 

This will have completely removed the JDK on macOS..

 


...