Serge Stikine's stuff

Just another WordPress site

How to uninstall (remove) JAVA from OS X Lion

Open terminal (Applications -> Utilities -> Terminal)

To remove JVM enter folowing:

sudo rm -rf /System/Library/Java/JavaVirtualMachines/

Then, clean up the installer records by removing them from /private/var/db/receipts/:

Now clear any traces of the Java installation from Software Update.

Please copy following file to your Desktop /Library/Receipts/InstallHistory.plist by entering following string in terminal:

sudo cp /Library/Receipts/InstallHistory.plist ~/Desktop

Change permissions on it

chown yourusername:staff ~/Desktop/InstallHistory.plist

Open it in TextEdit and find following:, remove all dict section which containing this line (it may be several of them)

Example of one of the records:

<string>Java for OS X 2012-003</string>

When you are finished with cleaning, save this file, exit from texedit. Then change permissions to original by entering

sudo chown root:wheel ~/Desktop/InstallHistory.plist
Copy it to original location
mv ~/Desktop/InstallHistory.plist /Library/Receipts/

Written by Stikine

March 2, 2012 at 07:30

%d bloggers like this: