Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Emptying the trash in OS X can be a long process, especially If you have lots of items (like me). This is after 5 minutes:

enter image description here

Is there a way to quickly empty the trash, or make the process a whole lot quicker?

share|improve this question
1  
And why does it take so long in the first place anyway? –  Thilo Sep 12 '09 at 6:55
2  
@Thilo: The Finder does some extra work of deleting files from all the devices attached to a computer, overriding permissions if necessary (using a subprocess called Locum), file stats, among others. –  Chealion Sep 12 '09 at 7:10

3 Answers 3

up vote 37 down vote accepted

If you do it through the Terminal it is nearly always considerably faster:

rm -rf ~/.Trash/*

However it can be noted that this won't delete files that appear in your Trash from external hard drives, other partitions, etc. Those files are stored at /Volumes/NAME_OF_DEVICE/.Trashes/USER_ID where USER_ID is your user ID. (Usually 501 on a single user system) and you'll have to remove them using a second command. (sudo rm -rf /Volumes/*/.Trashes/501/* should do all of them for you)

As always when using rm -rf be completely sure the path you've typed into the Terminal is correct or you're liable to delete much more than you mean to. (eg. a space before a * is never good)

As to why the Finder takes so long, the Finder does some extra work of deleting files from all the devices attached to a computer, overriding permissions if necessary (using a subprocess called Locum), file stats, among others.

share|improve this answer
    
sudo rm -rf ~/.Trash/* :) –  atasoyh Aug 14 '13 at 18:02
    
I didn't have to use sudo. –  Alex Ford May 15 at 20:44
    
Okay, this time I did. Depends on the permissions of the files thrown into the trash :) –  Alex Ford Jun 23 at 21:46

Check to see that "Empty trash securely" is not set. This erases files multiple times, so it takes much longer to delete.

The setting is in Finder's Preferences on the Advanced page. I've heard that sometimes a Snow Leopard upgrade accidentally sets this option.

share|improve this answer
    
This was the solution for me as well: defaults write com.apple.finder EmptyTrashSecurely -bool false –  Marius Apr 25 '12 at 21:31

If you need to empty the Trash of a mounted volume when using Finder in root mode (see http://yourmacguy.wordpress.com/2009/09/28/snow-leopard-root-finder/), it seems you can't just press Empty Trash in the Trash folder after pressing the icon (even ensuring the normal Finder isn't open). You will hear the trash emptying sound, but the trash does not get emptied.

Also, when browsing Finder in root mode doesn't show the hidden files and folders, even if you have enabled this option in your own user account.

Following Chealion's rm command with the asterisk at the end didn't seem to work for me. (Perhaps it was due to the double quotation marks at the ends; perhaps it needed the backslash format as demonstrated below.) Instead, I had to manually add the folder name; in my case:

sudo rm -rf /Volumes/Backup\ of\ Macintosh\ HD/.Trashes/0/_CCC\ Archives

(0 is the root user)

Which maps out to this, I guess:

sudo rm -rf /Volumes/[VOLUME NAME]/.Trashes/0/[FOLDER OR FILE NAME]

The asterisk wildcard not working might be a pain if you have many files and/or folders in the root Trash of a mounted volume.


CAUTION: Using Finder in root mode is definitely ill-advised for general use; use it in special circumstances. In my case, I wanted to backup and delete my Carbon Copy Cloner archived files (created in incremental backups), as just copying and pasting the "_CCC Archives" folder to a separate location threw up a load of errors while using Finder in normal user mode. I didn't have much luck with chown or cp under sudo either... so that's why I resorted to using root-mode Finder.


I am on Mac OS X 10.6.8 Snow Leopard, backing up my drive before the impending 10.7 Lion release.

share|improve this answer

protected by studiohack Aug 31 '11 at 1:19

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.