Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have an old macbook with some photos on it that I'm trying to sell. I want to keep the OS on there so that someone new can use it, but I have to wipe it through terminal because the screen is mostly broken.

How can I delete all accounts on my Mac and leave it with a fresh install with no DVD and a mostly broken screen?

Note: I don't have a video out adapter. I know that would be the easy option, but I'm a sucker for the Terminal.

Update: I used this article

It gives me a new account and the computer starts up as if I just walked out of the store with it, but it says that the other account still exists.

share|improve this question
If the screen doesn't work and there's no Terminal solution, you could always use VoiceOver to delete all accounts throught the GUI. – CajunLuke Aug 23 '12 at 22:48
I hope there's a terminal solution. Also, updated my question. – EGHDK Aug 23 '12 at 22:53
up vote 5 down vote accepted

Command Line Only

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

  1. the user's home directory
  2. the user's membership in groups
  3. user's primary group
  4. 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 & 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.

share|improve this answer
Sadly, I have to answer no to all of those questions. – EGHDK Aug 23 '12 at 23:02
@EGHDK I've revised my answer to include a command line only solution. – pdd Aug 23 '12 at 23:49
Awesome. Will try this out in a little bit. Thanks – EGHDK Aug 24 '12 at 0:13

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.