Return to First Boot
I repair people’s Macs for a living. Often the task requires reinstalling the operating system, and installing updates. Before I return a computer to its owner I always remove the temporary user account I created, and reset the machine back to the Setup Assistant. By following these commands, the owner has the chance to connect to wifi, create a new user account, and sign into iCloud the next time they turn on their computer.
- Boot into Single-User Mode by pressing
⌘-Sat startup. - Once the command-line prompt appears type the following commands.
mount -uw /rm -R /Library/Preferences/rm -R /Users/username/cd /var/db/dslocal/nodes/Default/users/- Type
lsto list the contents of the directory. - Delete the active user account, by typing
rm username.plistwhere username is the name of the active account. rm /var/db/.AppleSetupDonereboot- Mac OS X will restart, and the Setup Assistant will launch automatically.
⌘-Q and click Shutdown. The Setup Assistant run again the next time the Mac is restarted.
For Macs running Mac OS X 10.4 Tiger an earlier, follow these steps.
- Boot into Single-User Mode by pressing
⌘-Sat startup. - Once the command-line prompt appears type the following commands.
mount -uw /rm -R /Library/Preferences/rm -R /Users/username/rm /var/db/netinfo/local.dbrm /var/db/n.AppleSetupDonereboot- Mac OS X will restart, and the Setup Assistant will launch automatically.