Skip to content

Delete All Users from Mac OS X

If you’re setting up a Mac for a friend or family member, you probably created a single administrator account on the computer to install and update all the software . Now it’s time to hand the computer over to them, but what to do with this dummy account?

You should delete it. That way, when they turn on their computer for the “first time”, they can be greeted with Apple’s Welcome movie. To do this, you’ll need to boot the Mac in single user mode and follow these directions from Macworld Hints (

  1. Boot into single user mode. Hold Command-s at startup.
  2. Check the filesystem: /sbin/fsck -fy
  3. If no remaining errors, mount the filesystem: /sbin/mount -uw /
  4. Start up directory services:
    launchctl load /System/Library/LaunchDaemons/

    Note that single user mode said to use, but that didn’t work — this did.

  5. Find what groups the user belongs to: dscl . -list /groups GroupMembership | grep username— repeat for each group except for the user’s own group.
  6. Remove the group corresponding to the username: dscl . delete /groups/username (this may not be necessary — you may get an error that the group doesn’t exist; you can ignore it and go on).
  7. Remove the user account: dscl . delete /users/username
  8. At this point, you may wish to remove or archive the user folder in /Users.
  9. You may wish to remove the .AppleSetupDone file in /var/db to cause the Setup Assistant to run when next booted.
  10. All done? Type reboot to reboot the system or shutdown -h now to shut down the system.

Posted in Apple, English.

3 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

  1. Beano in NC says

    Does this apply for the New Apple Retina Macbook pro too? Mountain Lion?

  2. Celia says

    No, the OpenDirectory tool has changed in 10.6 and up. Need to follow this other article:

Continuing the Discussion

  1. Delete last Admin user from OS X [10.6-10.12] – CeliaMania linked to this post on August 17, 2018

    […] “Delete All Users from Mac OS X [10.5]”, we outlined how to boot into Single User Mode and use Terminal commands to delete the last admin […]

You must be logged in to post a comment.