Some time ago I had a user called "xy" on my system. I have deleted the user but in the /Users
directory there are folders called "xy" with a Desktop, Library etc. in it.
Why are they not deleted and can I delete them manually?
administratormacosuser-account
Some time ago I had a user called "xy" on my system. I have deleted the user but in the /Users
directory there are folders called "xy" with a Desktop, Library etc. in it.
Why are they not deleted and can I delete them manually?
Best Answer
TLDR: Deleting this user's home folder will not harm your system. It will, obviously enough, delete any of the files you created when you were logged in as the previous user.
How is it possible that there be a folder for a user who doesn't appear at the login window?
OS X keeps track of users and their passwords using Directory Services. On most people's computers the Directory Services files are stored in /var/db/dslocal. This database stores the names of users, and other information, such as the location of their home folder. When you deleted your user, your Mac removed the account entry (from the dslocal database), but did not delete the home folder stored in the /Users folder.
So why didn't the system automatically delete the home folder when it deleted the user from the database?
When you delete a User from System Preferences, you are asked what to do with the home folder itself. You can see from this screenshot which option you must have accidentally chosen:
What's the best way to delete the old user's home folder?
I would suggest logging into the account one last time to ensure it does not contain any files you wish to keep, and then deleting both the user record and its files (as you originally intended). To do so: