Wednesday, January 16, 2013

Reset MacBook Air to defaults


It works on Mac OS X Lion only.

1. Launch the Terminal application on you Mac. Then run the following sequence of commands (one at a time):

sudo su
dscl . -delete /Groups/admin GroupMembership yourAccountNameHere
dscl . -delete /Users/yourAccountNameHere

2. Now reboot your Mac into single-user mode by holding Command-S at startup.

3. Once booted into single-user mode, run the following sequence of commands (one at a time):

/sbin/fsck -fy
/sbin/mount -uw /
rm -R /Users/yourAccountNameHere
cd /var/db/
mv .AppleSetupDone .RunLanguageChooserToo
rm -R /Library/Caches/*
rm -R /System/Library/Caches/*
rm -R /var/vm/swapfile*
reboot

Your Mac will reboot to the start of the initial Apple Setup program just like when you first powered it on after purchase. All clean and ready to sell or give to a new user.

No comments:

Post a Comment