Note: This article has been updated for newer versions of Mac OS X (10.5 or later) that don’t use Netinfo Manager. Read the new article.
When I’m prepping an old Mac to resell or give away, I like to install a clean system and apply all of the available updates first. Of course, I need to set up the Mac and create a user so I can log in and run installers, but then I want to clean it up and reset it so it will run the initial Setup Assistant on first run for the new user.
It seems like I’m constantly searching for the exact Terminal mojo to make this go, so here’s the trick. Next time I’ll only have to search my own web site. (This tip consolidated from these tips on Mac OS X Hints.)
- Boot into single-user mode (⌘-S during startup)
Once the command-line prompt appears, type the following:12345678mount -uw /rm -R /Library/Preferences/rm -R /Users/[username]/cd /private/var/db/netinfomv local.nidb local.oldrm ../.AppleSetupDonereboot
OS X will restart and the setup assistant will launch automatically.
If you’re doing this to get the Mac ready for a new owner, just press ⌘-Q once the opening animation finishes, and click Shut Down. The Setup Assistant will automatically run the next time the Mac is started.
See also this tip on removing Classic cleanly. Sure, that old G4 iMac you’re giving to your niece can run Mac OS 9 apps, but do you really want to confuse her with the whole Mac OS 9 vs. X thing at this point? No. No, you don’t. Get rid of that Classic environment altogether. Trust me.
You should check out my podcast about movie magic and VFX: The Optical.