Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Permanently deleting a user's home folder System
As an administrative user, you can create a new user account by using the System Preferences: Users section and simply adding a user. Similarly, you can delete a user. The problem is, the deleted users directory doesn't go away, it is just renamed in the /Users directory to "username Deleted". You cannot throw out the Deleted directory using the finder, even as an administrative user. Here is where being able to get to the Unix core is so great.

With administrative power, you are one command away from deleting that unwanted directory. You are also one command away from deleting everything on your system. Here is the command:

sudo rm -rf /Users/"username Deleted"/

If you were to mistype the username and accidently remove your account, there would be no recovering your files. The destructive potential of the rm command is probably one of the main reasons the root account is somewhat hidden (just my opinion).

[Editor's note: You can use a slightly safer variant of the same command by simply adding and "i" to the "-rf" string; the revised command would read sudo rm -rfi /Users/"username Deleted"/ -- this will have "rm" ask you to confirm each file deletion]

Don't fear the command line, it can be a really great thing. But please, use caution anytime you have to use root privilages to rm a file or do anything else. Other than that, learn vi! Enjoy the Unix that your Macintosh is running.
  • Currently 1.83 / 5
  You rated: 1 / 5 (6 votes cast)

Permanently deleting a user's home folder | 1 comments | Create New Account
Click here to return to the 'Permanently deleting a user's home folder' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Very good hint
Authored by: macosxleopard on Feb 01, '08 01:28:52PM

Very good hint! I use it all the time!

[ Reply to This | # ]