Unable to ‘Empty Trash’ problem (i.e. How to delete locked files in OS X)

Recently I encountered this problem when trying to empty my Trash folder — the process kept being interrupted by an error message: “The operation cannot be completed because the item “wmphelp.htm” is locked”.

I hit the Continue button and there were similar messages: “WMPIcon.gif” is locked… “windowshade.gif” is locked…

Here’s a sample screenshot (from Otterman):
//myskitch.com/sivasothi/empty_trash_cannot_complete-20071202-135711.jpg” cannot be displayed, because it contains errors.

Clearly the problem were with files related to Windows Media Player I deleted earlier. I had about 300 over files in the Trash folder so I needed to find a solution quickly.

I emailed the folks in the me@n list (thanks folks!). Their suggestions included:

  1. Repairing the file permissions with Disk Utility before attempting the Empty Trash operation.
  2. Manually checking the offending file to ensure that I had Read/ Write permission
  3. Press Option + Empty Trash

Tried suggestion #1 (even booting from a startup disk and running Disk Utility from the CD) but still had the error message.

Tried suggestion #2 but problem was those specific file names weren’t in the Trash folder.

Suggestion #3 didn’t work either.

In the end, Siva aka Otterman provided the solution. He suggested “Cmd +Option + Shift + Backspace”.

It worked beautifully!

Even scared me a little ‘cos there was no prompt to confirm the Empty Trash operation. Hit those combinations and it cleaned out everything in the Trash folder immediately.

I’m still not quite sure why the offending file couldn’t be deleted (even though I had permission to delete it). But at least now I’ve picked up this neat trick with the keyboard shortcut.

Siva has more details about deleting locked files in OS X at this post. Excerpt:

In Finder:

  • cmd-Backspace = move selected item to trash
  • cmd-shift-Backspace = empty trash (with warning prompt; locked files not deleted)
  • cmd-option-shift-Backspace = empties trash without dialog, included locked files

106 thoughts on “Unable to ‘Empty Trash’ problem (i.e. How to delete locked files in OS X)

  1. It’s somewhat amusing that many Mac users seem to think that “repair permissions” is a suitable response to any and every problem a user may have on OS X. It’s the uncomprehending – but eager to give advice – Mac user’s equivalent to a witch doctor’s rain dance.

    In Leopard, Apple has actually put a note on Disk Utility explaining what they’ve put the function there for. Unfortunately, that won’t stop people thinking it’s a magical cure for anything and everything.

    Anyway, I’d have looked at Apple’s support documents under “can’t empty trash”. Here’s the document:


    You’ll see it does reference another Apple document called “Troubleshooting permissions issues in Mac OS X”. BUT it specifically references the section in that page called “Emptying the Trash”, which discusses the way permissions on that file may relate to the problem rather than advising the customer to run Disk Utility on the volume and forlornly hope.

    The problem can get quite tricky, and even Apple’s tips there may not solve it, since there could even be immutable flags set on the file.

    Anyway, glad you resolved the problem, but I’d suggest with most problems Apple’s Support site is the very first place to look.

  2. Stumbled upon your blog a week ago and decided to come back. Not for the articles you write, but for how you write them, really amazing stuff you’re doing here, i like how you put information into the articles which makes it much more easier to read and much more interesting of course. Keep up the good work!

  3. THANK you for this !!! i have been trying to clear out my external USB crives after changing over from PC to Mac and they were littered with thousands of locked files which I was going through one by one… jeeez

    Now – one click and they are GONE !!! 😀

  4. Yeah same here, has not fixed it at all. Got really built up with hope then dropped like my old PC. Oh well there will be a solution somewhere.


  5. I too am having this issues. It is with windows files from my Boot Camp partition. It was a Fat32 Partition, that I needed to erase and reinstall. Now the reinstall went well, but nothing I have tried, including terminal removal and permission repair tools.

    Any ideas?

  6. I solved my issue, but I thought I would leave info for those with the same issue.

    Mine was that Mac can’t trash items on a windows FAT32 drive. When I was trying the Terminal batch remove or change properties method (found in the links of the post above), I noticed that the files were located in a hidden “.Trashes” file on the root of my Boot Camp partition. So I went to the windows Control Panel, then to Files. Then I choose the Show Hidden check box. After that the .Trashes folder was visible on the root level of the windows (boot camp) C drive. I just had to move the folder to the Recycle bin and empty it.

    Viola, when I booted back to OSX, the trash was finally EMPTY!!!

    Hope this helps,

  7. Cmd option shift didn’t work for me, but Partners in Grime is my new hero.

    Moved the mouse over the dock, held control, clicked the trash can, and was presented with a ’empty trash’ menu option which worked.

    No more dragging media player out of the trash to empty it for me! Thanks!

  8. remember not to select ’empty trash’ but hit the actual delete key with the command + option + shift keys. Great to hear that trash sound! I had been trying to get rid of locked files for months without success!

  9. I’m having a similar problem. When I try to empty my trash, Mac OS X unexpectedly quits. The gray curtain comes down and I have to restart.

    I’ve sent the report to Apple and am waiting for a response. Not sure they will get back to me.
    I tried the suggestions above – none worked.
    I’m at my wit’s end.

    I do know there is a “bad” .mov file in the trash (which I can’t see… it’s invisible!!) and there is another file in the trash that has had problems in the past – which one, I don’t know. I have over 40GB in the trash that needs to be dumped.

    Thank you!

  10. NOPE.. That didn’t work. I fear I will have to erase the entire drive and start from scratch….


  11. Oh, THANK YOU! I have had a few ginked up photo files that I have been trying to delete for FOUR YEARS!!!!! command+option+shift+empty trash! Yay!

  12. Unbelievable…It worked….I have tried for months to get rid of locked files. I tried 2 of them about the same time… Not sure which worked but THANK YOU

    • ‘Cos this blog is not an A-lister blog, I think. So probably didn’t turn up high on google search results. LOL. Glad it solved your problem, Andy. I can understand what it relief it is to finally solve the trash problem 🙂


    It’s Shift + Option + Command + Backspace, not delete.

    Worked for me. Thanks!

    Otherwise there are some utilities that can do it if you have a corrupt file that won’t trash.

  14. Dude, thank you very much. I was having trouble deleting my music library after a screwed up import from an external NTFS drive. I was really annoyed how Leopard kept telling me to use option + “empty trash” when it didn’t work at all. Thanks for pointing out the right keys. Much appreciated –
    have a nice day all 🙂

  15. i must say, this crzy trick saved my life!! found you on google an im immediately a follower of your genius!! you don’t know how long this has been killing me!! keep doing what your doin!!!!

  16. I appreciate this guidance – and rushed home to try it. But since my Apple keyboard died, I’m hooked up to a Dell keyboard. Is there an key sequence I can use on a standard pc keyboard to experience the same result?

  17. got it… my windows keyboard attached to os x —>

    shift + windows key + alt + backspace

    all gone, all done. Thanks

  18. Wow… that was huge. Thank you so much for the great advice… I thought I was computer savvy.

  19. Awesome !!!

    it’s been annoying me for weeks and somehow I just kept adding locked files to the bin. Every time I needed to delete other files it kept coming back up.
    Fantastic worked for me and real eazy to understand.

  20. I had 4 files left by a demo install of VMWare fusion that simply would not delete – telling me that they were in use.

    Onyx saw them off instantly!


  21. I too had a trash can that just wouldn’t empty … no idea why, but everytime i would try to empty it, the dialog would come up showing it was emptying and then would just disappear and no files would be trashed.
    Just followed your advice now: opened trash can, clicked cmd+option+shift+backspace and voila, i’m watching the trash empty right now 🙂 awesome. Thx

  22. Hi me again….sorry I don’t know how to delete the previous post. Deleting all those locked files of wmp.htm might have block the hotmail web access, the fact is that by restarting the mac it worked again!

    Sorry to take space in this useful blog! good luck!

    • That’s alright. I deleted it for you. The earlier comment was a bit unrelated to this post. But left your last comment intact, so that you know it’s nothing against you. Cheers 🙂

  23. Just wanted to say thanks. I had like a little zipped folder that was locked on to my documents after transferring work I did at school using my USB on a campus computer. When I saw that I couldn’t delete that folder out of my computer I got scared it was a virus or something, but its gone now! Thanks!

  24. Bahahaha!!!!

    Thanks so much man I have been trying to figure that out for so long & had just let the damn trash fill up…

    I just emptied like 100,000 items or something crazy lol

    …also my hero! : )

  25. I am unable to empty trash with the given solution. The file names are:
    1) éΠ=è?².h}i
    2) í¹Fóf«µÐ.¼‘

    Both these files shows zero kb space. But they are not getting deleted from trash. Please help!

  26. try and thats force trash to empty

    open terminal
    after $ put this command
    sudo rm -Rf ~/.Trash/* press enter

    put your password

    and your done

  27. My grandson left over 3000 files in my Mac from games he downloaded a year ago. I finally found your BLOG and cmd opt shift delete is doing the job right now. Down to less than 2000 already.

  28. Question. Is it just deleting the files names from the directory or is it actually securely erasing them?

  29. DO NOT “Secure Empty”!!!!
    Open up Terminal (Applications>Utilities>Terminal) and type in
    sudo rm -R
    There is a space after -R
    Don’t hit enter yet, open up your trash, and drag them to the Terminal window. Now just hit enter, and all of your files in the trash will be DELETED. NO RECOVERY POSSIBLE.

  30. Thanks a lot, getting rid of old Time machine Backups can be a real pain. The files were locked and even LION couldn’t delete it even though you had the choce of deleting locked files.

  31. cmd+option+shift+backspace = Awesomeness!!! I tried several things and thinng work. Thanks guys!!!

  32. i have problem with my mac OSX lion, i has delete some error file from my SD memory it have error space 40Gb in SD 4GB, after i delete it from SD it make my mac lost space 40Gb, but it don show in my trash. how can i recover my space back?

  33. wow, it was actually scary to watch 65k items delete in under one second. took me days to delete just a bit over that on my other computer (which didn’t have locked files/any other issues).
    would be lovely to understand these shenanigans…

  34. spot on, our mac service asked me to bring in my machine & he could fix the problem in 15 minutes , driving cross town to get there would have made the exercise about an hour worth maybe even two, this fixed under 1 minute lol thank you very much

Comments are closed.