How to Prepare Your Mac for Resale
- 4 comments
- tagged with mac, computer, leopard
First thing is first: you want to re-install Mac OS X (this guide requires Leopard). Insert your OS X disk and boot off it. Make sure you do a “Clean Install” so as not to leave any of your files on the system.
When the install is finished, your computer will restart and you’ll see the traditional OS X welcome screen and the setup assistant. Go through all the settings, choosing anything just to get the system booted up. However, make sure you take note of the user account login you use. For this guide, I will assume login of temp, and if you don’t have a good reason not to, you should do the same.
At this point you want to download any Apple updates and install them, as well as install any bundled software you plan to advertise the machine coming with. When all your installs are finished and the machine is as you want it for the customer/recipient, shut down the machine.
Next, turn the machine back on but as soon as you hear the Mac chime noise, press and hold ⌘S until you are taken to a console (white text on black screen — looks real nerdy and sci-fi).
The next step is to run all the commands in the code block below
NOTE: If you didn’t use temp as your username you created in the setup assistant, make sure you replace all instances of temp with your actual username.
# Mount the file system so we can modify it/sbin/fsck -fy/sbin/mount -uw /# Activate directory services/bin/launchctl load /System/Library/LaunchDaemons/com.apple.DirectoryServices.plist &# Delete all traces of the temporary account/usr/bin/dscl . -delete /Users/temp/usr/bin/dscl . -delete /Groups/admin GroupMembership temp/bin/rm -rf /Users/temp# Get rid of a few other files/bin/rm -R /Library/Preferences/bin/rm -f /root/.bash_history# Now we make it appear as though the initial setup assistant# still needs to run/bin/rm /var/db/.AppleSetupDone# Reboot and check that it seems like# it is a new mac, then turn off your computer# and sell it!/sbin/reboot
Comments
-
mlambie says:
Deluxe article Bo. I'm *literally* in the process of doing a fresh install of Leopard for my wife on her new MacBook Pro (which is my old MacBook Pro ;) -
Bodaniel Jeanes says:
Cheers Matt -
Andrew Ramsden says:
Great article!
It's also important to wipe the hard drive well, a "clean install" won't stop some (nefarious) people from accessing much of your old data.
Darik's Boot And Nuke is a great tool for thoroughly wiping the drive (dban.org)
Also, it would be good to know which areas of the Mac to backup before wiping. Obviously there's /Users/me/ but are there other locations you would recommend checking? -
Bodaniel Jeanes says:
@Andrew
I always run a little `ls -1 /Application` so I can remember the apps I have (or if they are little drag and drop ones, I'll just back them up). Other than that you might want some Preference Panes that you might have installed system wide in /Library/PreferencePanes.
Other than that I think for 95% of people the home directory would suffice.
Boot and Nuke sounds cool. However, in the Leopard boot disk you can also choose Disk Utility and select the drive and do an advanced erase. That gives three options: 1-pass zero out, 7-pass zero out, and 35-pass zero out for the particularly paranoid. I personally always do a 1-pass at the very least.