How do I uninstall Java6 from Mac OS X
With the end of public updates for Java 1.6 in February 2012, and the long list of security updates on the later 1.7, I am inclined to remove Java 1.6 and the JDK permanently from my Mac, if only I knew how to accomplish this in a clean way.
Oracle Java EOL announcement
In Mac OS X 10.7 the JDK provided by Apple (Java 6) is installed in /System/Library/Java/JavaVirtualMachines/ so just delete it from there
The JDK provided by Oracle (Java 7) is installed in /Library/Java/JavaVirtualMachines/
I had the same question until today.
From The macosx-port-dev Archives and How to properly uninstall Java 6 on OSX?:
I agree with the assessment below,
(Previous message)
I don’t know the answer to your question, but I can suggest that you might be causing yourself unneeded problems.
Security updates are important because of web sites that use Java maliciously. But you can’t use Java 6 on the web anyway. You can only run Java 7 for applets.
Java 6 is on your machine for legacy software that relies on it in standalone applications. The security issues aren’t going to impact these apps. The security issues are invariably sandbox violation tricks, and the standalone apps aren’t running Java sandboxed anyway.
however if you wish to rid your machine of Java SE 6, the correct procedure is:
Remove the "system" JVM installed and maintained by Software Update
% sudo rm -rf /System/Library/Java/JavaVirtualMachines/1.6.0.jdk
Remove any Java Developer Previews
% sudo rm -rf /Library/Java/JavaVirtualMachines/1.6.0*.jdk
Do NOT remove any content in the JavaVM.framework (Note.: It under
/System/Library/Frameworks/JavaVM.framework
)Those items are required by Java 7, 8, 9+ as well as Java SE 6. No modern version of OS X has a Java JDK inside there anyway.