Resetting Mac OS X

We were looking to give some old Macbooks to other people, so we wanted to reset it back to a vanilla state, without the original OS disc. This means performing:

1) Remove user data/profiles

2) Securely erase free space so undelete will not recover anything.

 

I found these links which helped when operating in single user mode (hold command + s at startup):

– resetting users and the installation: http://www.numlock.ch/news/it/how-to-reset-a-mac-os-x-installation/

– erasing freespace – http://sabiancrash.blogspot.co.uk/2011/06/how-to-run-diskutil-in-single-user-mode.html

Both can be achieved from the same single-user session. Once rebooted, the computer will launch the Welcome experience

On some newer macs, the diskutil utility may not work from single-user mode, so I ended up booting with a Mac OS X  upgrade USB (this one was for Mountain Lion for use on another computer) to use the DiskUtil GUI tool to clear the free space.

Note that applications will be left intact, so if you wanted to remove anything and tidy up the Applications drawer, you’d have to do this before removing the user profiles. These steps worked for an old G4 Powerbook and the original Macbook Air.

(this is useful too – https://discussions.apple.com/message/15701551#15701551)