Delete all OS X accounts in terminal when selling laptop
Command Line Only

It looks like there are a four things that need to be deleted:


the user's home directory
the user's membership in groups
user's primary group
the user's actual account along with their password hash


The University of Utah Mac Managers group submitted a scrip to CodeSnippets to handle this. Credit for this answer goes to Chealion.



Use of Another Mac with FireWire &amp; Install Disk

Boot the MacBook into target disk mode, connect it to your other Mac via FireWire, clean wipe the hard drive, and install a fresh copy of the OS.