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.

I have a couple pictures I was looking through and deleting stuck in my trash (Mac OS X 10.6 latest) and finder tells me they are in use when I try to delete them.

I looked around online and found the lsof command in terminal (type lsod with a space, drag the file onto terminal, press enter) it told me the file was in use by:

 COMMAND     PID     FD
 Finder      7747    txt
 Finder      7747    13r
 mdworker    8685    txt
 quicklook   8822    13r
 quicklook   8822    14r

any idea what I can do about this? (other than restarting, this happens to me quite a bit), I'm wondering if this could be a bug as well.

Thanks for any help.

share|improve this question
add comment

4 Answers

Did you try Secure Empty Trash?

Right-click on the Dock, and hold the Command key. Then click on Secure Empty Trash. It works for me, sometimes.

Else, open up Terminal.app and type kill -9 <PID>

share|improve this answer
    
Wouldn't it be bad to kill finder? –  user32791 Mar 31 '10 at 3:12
    
It shouldn't be bad. If you're uncomfortable using "kill", try holding Option while right-clicking on the Finder icon in the Dock. Then select the "Relaunch" menu item. –  Lawrence Velázquez Mar 31 '10 at 5:42
add comment

Try first to reboot the machine. Otherwise, you'll have to force terminate the processes.

share|improve this answer
    
Rebooting works for sure –  user32791 Mar 31 '10 at 3:11
add comment

Is it a bug? Kinda. In a perfect world, programs like quicklook wouldn't hold onto files, or would release them when notified that they're about to be deleted.

In this world, there's nothing wrong with terminating the offending programs (quicklook may be enough, the Finder doesn't usually cause problems that last more than a few seconds).

Either kill them in the Terminal, or use Activity Monitor to signal them to quit. Most programs, including the Finder, will relaunch automatically. kill -9 or Force Quit are overkill, unless they don't listen to the nice signal.

If you're still unable to delete them, logging out and back in is a quicker alternative to restarting that will release the files in the majority of cases.

share|improve this answer
add comment

Quick Look holds on to two items at a time. Annoying, but that can be used to your advantage. Simply select two new new files in Quick Look, and it will purge the old ones from its memory, allowing you to empty the trash.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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