{"id":386,"date":"2023-04-12T05:32:10","date_gmt":"2023-04-12T05:32:10","guid":{"rendered":"https:\/\/techtutelage.net\/?p=386"},"modified":"2025-05-18T05:05:18","modified_gmt":"2025-05-18T05:05:18","slug":"how-to-uninstall-java-from-mac-os","status":"publish","type":"post","link":"https:\/\/techtutelage.net\/?p=386","title":{"rendered":"How to uninstall Java from Mac OS"},"content":{"rendered":"\n<iframe loading=\"lazy\" width=\"560\" height=\"315\" src=\"https:\/\/www.youtube.com\/embed\/choy9BjSWSo\" title=\"YouTube video player\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" allowfullscreen><\/iframe>\n\n\n\n<h2 class=\"wp-block-heading\">Uninstall Java from MacOS step-by-step guide.<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Start by opening terminal window in your Mac, and executing the following command to get currently installed version of Java.<\/p>\n\n\n\n<pre class=\"wp-block-code has-vivid-green-cyan-color has-black-background-color has-text-color has-background\"><code>java --version<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">If you have Java Installed on your system you will should get output that look similar to the one below.<\/p>\n\n\n\n<pre class=\"wp-block-code has-vivid-green-cyan-color has-black-background-color has-text-color has-background\"><code>java 20 2023-03-21\nJava(TM) SE Runtime Environment (build 20+36-2344)\nJava HotSpot(TM) 64-Bit Server VM (build 20+36-2344, mixed mode, sharing)<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">If Java is not present on your system, you will get the following output.<\/p>\n\n\n\n<pre class=\"wp-block-code has-vivid-green-cyan-color has-black-background-color has-text-color has-background\"><code>The operation couldn\u2019t be completed. Unable to locate a Java Runtime.\nPlease visit http:\/\/www.java.com for information on installing Java.<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Once you have confirmed that you have Java on your system you can go ahead and complete the steps below to un install it. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">First you need to find the installation directory. Default directory on Mac OS is &#8220;\/Library\/Java\/JavaVirtualMachines&#8221;. Just to be sure run the following command to confirm.<\/p>\n\n\n\n<pre class=\"wp-block-code has-vivid-green-cyan-color has-black-background-color has-text-color has-background\"><code>\/usr\/libexec\/java_home -V<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The output you get should look similar to the one below. As you can see on my system I have Java 20 and Java 17. Yours may, or may not look the same. Regardless of what version you have here you will be able to see the installation path &#8220;\/Library\/Java\/JavaVirtualMachines\/&#8221;.<\/p>\n\n\n\n<pre class=\"wp-block-code has-vivid-green-cyan-color has-black-background-color has-text-color has-background\"><code>Matching Java Virtual Machines (2):\n    20 (x86_64) \"Oracle Corporation\" - \"Java SE 20\" \/Library\/Java\/JavaVirtualMachines\/jdk-20.jdk\/Contents\/Home\n    17.0.6 (x86_64) \"Oracle Corporation\" - \"Java SE 17.0.6\" \/Library\/Java\/JavaVirtualMachines\/jdk-17.jdk\/Contents\/Home\n\/Library\/Java\/JavaVirtualMachines\/jdk-20.jdk\/Contents\/Home<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">To remove Java all you have to do is run the following command, replace the version number with the one you would like to remove from your system, when prompted enter your password.<\/p>\n\n\n\n<pre class=\"wp-block-code has-vivid-green-cyan-color has-black-background-color has-text-color has-background\"><code>sudo rm -rf \/Library\/Java\/JavaVirtualMachines\/jdk-17.jdk<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">In the example above Java 17 will be removed from the system, to remove Java 20 replace &#8220;jdk-17.jdk&#8221; with &#8220;jdk-20.jdk&#8221;.<\/p>\n\n\n\n<p class=\"has-vivid-red-color has-cyan-bluish-gray-background-color has-text-color has-background wp-block-paragraph\"><strong><em>WARNING: Do not attempt to uninstall Java by removing the Java tools from &#8220;\/usr\/bin&#8221;<\/em><\/strong> !!!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Uninstall Java from MacOS step-by-step guide. Start by opening terminal window in your Mac, and executing the following command to get currently installed version of Java. If you have Java Installed on your system you will should get output that look similar to the one below. If Java is not present on your system, you [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9,1],"tags":[],"class_list":["post-386","post","type-post","status-publish","format-standard","hentry","category-tutorials","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/techtutelage.net\/index.php?rest_route=\/wp\/v2\/posts\/386","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/techtutelage.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/techtutelage.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/techtutelage.net\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/techtutelage.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=386"}],"version-history":[{"count":2,"href":"https:\/\/techtutelage.net\/index.php?rest_route=\/wp\/v2\/posts\/386\/revisions"}],"predecessor-version":[{"id":388,"href":"https:\/\/techtutelage.net\/index.php?rest_route=\/wp\/v2\/posts\/386\/revisions\/388"}],"wp:attachment":[{"href":"https:\/\/techtutelage.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=386"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/techtutelage.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=386"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/techtutelage.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=386"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}