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 trash on Mac is quite troublesome at times, because some files are locked.
Is there an easy way to force empty without going to the terminal typing the rm command?

share|improve this question
    
How can applications be using items in the Trash? What is the purpose of Trash if this is even possible? –  Paul Lammertsma Sep 17 '10 at 21:37

5 Answers 5

up vote 4 down vote accepted

Oh, I found a very easy way to do this.

  1. Hold down the Option key and click on the trash bin
  2. Release the click (still have option key pressed)
  3. Click on "Empty Trash" (still have option key pressed)
  4. Done.

Hm.. hidden feature of Mac.

Source of Help

share|improve this answer

If the files are locked, not in use, hold Option while clicking Empty Trash, as the dialog suggests:

Locked Trashed file dialogue

If the files are in use, the easiest way to forcefully delete them is to just use the rm ~/.Trash/* command

share|improve this answer

Hold down the Option key while emptying trash.

share|improve this answer

As others have mentioned, you can hold down the option key () while choosing Empty Trash to ignore locked files. But if they're actually in use, you have a few options:

  • Figure out which applications are using the files with lsof and grep (e.g. lsof | grep in_use_filename), and quit those applications
  • Use the rm command to delete ~/.Trash/*
  • Choose "Secure Empty Trash…" from the Finder menu. If you have a lot of files, this will take a while, since it actually overwrites the contents before deleting... but if you don't, it's an easy way to ignore the purportedly in-use files and delete them anyway.

Secure Empty Trash

share|improve this answer
    
Does Secure Empty Trash help with locked/in-use files? –  dbr Jul 28 '09 at 10:00
    
Yes, as I said. –  jtbandes Jul 28 '09 at 15:29

Forcing-deleting a locked file can sometimes cause issues - you may be deleting a file that is actually in use, possibly by the system. Logging out and back in again will usually cause the locking process to release the files, allowing normal deletion. E.g.: I periodically trash everything in my user, and the system's, caches. Some of them are locked and that's how I unlock them.

share|improve this answer

protected by studiohack Apr 27 '11 at 1:10

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.