You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Anyone know how to reset Lion to the factory default ?

Dear Forum,


Up to Snow Leopard, there was a (inofficial) procedure to reset the operating system to its factory default with resetting the setup DB and removing all users entries. Unfortunately this procedure does not work anymore on Lion as the "com.apple.DirectoryServices.plist" doesn't exist anymore!


Anyone having an idea how to modify the procedure and to reset Lion?


Thanks a lot!

Mac Pro, MacBook Pro, MacBook, Mac mini, Mac OS X (10.6.4)

Posted on Jul 22, 2011 4:51 AM

Reply
10 replies

Jul 22, 2011 5:04 AM in response to Thebestplacehere

The procedure in question would basically reset your system to the state when you bought your computer from the Store. This was very handy if one wanted to sell the computer without having to reinstall from scratch.


Of course all licensed software needs to be removed first, but the Apple software and system updates remain at their latest version.


Is not really a must have but was very helpful!

Jul 22, 2011 3:21 PM in response to aladdin

I have been able to accomplish this via the following method. I may not be the best idea given it deletes the account while logged in, but worked for me.


1) Do all of the necessary installations, etc. just as under Snow Leopard, using your setupacctname account.


2) Once that is done, BEFORE restarting in single user mode:


sudo su

dscl . -delete /Groups/admin GroupMembership setupacctname

dscl . -delete /Users/setupacctname


3) Reboot into single user mode (Hold Command-s at startup)


4) Check the filesystem: /sbin/fsck -fy


5) Mount the filesystem: /sbin/mount -uw /


6) Remove the setupacctname directory: rm -R /Users/setupacctname


7) Remove or rename .AppleSetupDone so you get the language choice


cd /var/db/

mv .AppleSetupDone .RunLanguageChooserToo


or


rm .AppleSetupDone


8) Delete miscellaneous files (unnecessary, but useful if you're imaging the drive):


rm -R /Library/Caches/*

rm -R /System/Library/Caches/*

rm -R /var/vm/swapfile*


9) Shutdown or restart

Anyone know how to reset Lion to the factory default ?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.