Empty all trash cans at once

Apr 29, '01 12:21:26PM

Contributed by: robg

Being inherently multi-user, OS X creates a trash can for each user. There's no simple (GUI) way to empty all of these trash cans. Even if you're logged in as root, you have to remove each one individually. Over in this MacNN forum, however, 'MickS' posted a one-line terminal command that will empty all of your trash cans at once. Warning - this is not un-doable, and you won't get any 'Are you sure?' messages before the trash is emptied.

To empty all the system trash cans at once, start a terminal session and type

sudo find / -name ".Trash" -type d -print | xargs rm -fr
You'll have to enter your admin password, but then it should just run. NOTE: I have not tried this myself yet, so use at your own risk.

Comments (6)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20010429122126787