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?

link|improve this question

73% accept rate
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
feedback

6 Answers

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

link|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
feedback

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

link|improve this answer
feedback
up vote 3 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

link|improve this answer
feedback

Hold down the Option key while emptying trash.

link|improve this answer
feedback

or whatever's in use look it up in the activity monitor, force quit it, then empty the trash

link|improve this answer
feedback

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.

link|improve this answer
feedback

protected by studiohack Apr 27 '11 at 1:10

This question is protected to prevent "thanks!", "me too!", or spam answers by new users. To answer it, you must have earned at least 10 reputation on this site.

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