My computer is hooked up to a school domain, and a few people used it to log on. Now, the accounts of the other users are still here. I don't have any of their files, but just the empty shell accounts OS X creates by default. It's still about 250MB per user (from the default stuff OS X puts in, plus caches they used while browsing etc.).

Can I delete these user folders safely (with sudo)? Or do I need to do some Directory Services magic to make sure OS X knows the users are gone?

EDIT: The users aren't in my "/Search/Users" DirectoryServices list, nor are they in /etc/passwd. Their user folders are shown as being owned by numeric IDs, rather than their actual names.

2 Answers 2


You do need to do some Directory Services magic because normally /etc/passwd doesn't really exist on a Mac and is being created each time you access it from the records in Open Directory.

To remove your users from the terminal, run:

dscl . -delete /Users/username

Where username is the user you want to remove.

Otherwise, you should be able to do this from the GUI by going to System Preferences -> Users & Groups -> Select the user from the user column and remove it with the minus. It will ask you about removing the user's home directory and you want to say yes.


Check if the users exist in the system with:

dscl . -list /Users

If they don't exist, then you are safe to remove the home directories located in the root of the filesystem at /Users/username.

  • 2
    These users aren't in the "Users & Groups" preferences, nor are they listed in /Users in dscl. Feb 3, 2014 at 9:36
  • When I try that it shows me the following message: <main> delete status: eDSPermissionError <dscl_cmd> DS Error: -14120 (eDSPermissionError) What's the issue here?
    – Leo
    Nov 29, 2017 at 13:36
  • You need root permissions. Try again with "sudo" in front of the command. Nov 29, 2017 at 17:51

else case delete via sysadminctl

sudo sysadminctl -deleteUser <username>

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .