Can’t Empty Trash in OS X Lion?

I’ve ran across a few people who have upgraded their Macs to Lion and are having trouble emptying the trash! Apparently, it gets stuck and the progress bar never finishes. If you’re having a similar problem with your Mac, then try out a few of the methods below to fix the issue.

empty trash

Terminal Command

The one solution that seems to fix the problem is to open Terminal and type in the following command:

sudo rm -rf ~/.Trash

This will basically delete the trash folder on your Mac, which will force OS X to rebuild it. This usually fixes whatever problem there may have been with the original trash folder. Note that you will have to type in your administrator password and it will be blank while typing (you won’t see the letters).

Option Key

Another quick thing you can try is to press and hold the Option key and then clicking Empty Trash. This usually will help trash any problem files that you may have.

Securely Delete Trash

If you still cannot empty the trash, you can try to securely delete the trash. You can do this by going to Finder and then clicking on Secure Empty Trash.

secure empty trash

Restart Computer

Sometimes the trash will not empty if there are files in the trash that are currently in use by a program and therefore are locked. This is a bit tricky because if you have thousands of files and there are only a few that are locked, then it’s hard to find them.

You can try restarting and see if that help. If not, you can download a program that will delete all the unlocked files.

http://www.macupdate.com/app/mac/25821/raw-trash

Once you delete all of them, you’ll be left with locked files. Now right-click on each file in the trash and click Get Info. In the bottom left corner, you’ll see an option to unlock the file. It’s a check box like below:

unlock file

You should then be able to delete the locked files. Unfortunately, OS X does not delete all unlocked files and leave the other ones. Instead it just deletes the files in order and if it runs into a locked file, then it just stops! Annoying. Maybe they’ll fix that later.

If you’re still having problems emptying the trash, post a comment here and let us know what you tried and I’ll try to help! Enjoy!

 

More posts from the OS X Category

Fix FaceTime “The server encountered an error processing registration” Error

Mac OS X Verbose Mode

Mac OS X Startup Keyboard Shortcuts

sharing-icon.jpeg

How to Permanently Stop Dock Icons from Bouncing

Stream Media from the Mac to the Xbox 360

  1. Criticalmass says:

    Absolute legend.

    The terminal command worked perfectly.

  2. Robbie Guevara says:

    Hi! First, I couldn't drag things to the Trash without having to type my Admin Password, after which it would just empty it right away.

    Your Terminal solution really helped!

    Thanks so much! :-)

  3. Claus Jensen says:

    After deleting a huge folder, I had the problem where emptying the trash just stalled. I tried all of the above with no success. Even trying to delete the Trash-folder from the terminal just stalled.

    I then tried rebooting into safe-mode (by holding shift during boot). Then I was able to delete the Trash-folder from the terminal and my problem was solved.

    • Bill says:

      Thanks, Claus. I had the same experience and your fix took care of it. I’m amazed that an OS as mature as this could still have a such a glaring bug as the inability to delete large folders. Sheesh. Thanks again.

  4. shoc says:

    Thanks the sudo solved it! _o_

  5. Antonio says:

    When i try to empty my trash the Mac restarts itself. Any help?

  6. Andy says:

    Option delete worked for Time Machine backup deletion… Thankyou!

  7. Matt says:

    Thanks for this.

    I adapted “sudo rm -rf ~/.Trash”

    to simply “rm -rf ~/.Trash/PROBLEMFILE”

    worked fine

    You may want to add this as it does not require superuser and it does not require OS X to rebuild the trash folder

    Matt

  8. Matt says:

    I guess you could also simply use “sudo rm -rf ~/.Trash/*”
    if you wanted to delete all contents

  9. Kate says:

    I had unlocked an avi file from a movie that I downloaded, but couldn’t simply empty the trash. After reading your article, I tried the “Secure Empty Trash” function and it worked like a charm. It took awhile, but eventually the fans kicked in and all 700+mb of avi file was deleted! Really simple for a non-techie like me! Thanks for the suggestion!

  10. Dan says:

    Matt, Using the wildcard worked perfectly for deleting hung DB files. Great work; thanks.

  11. marco says:

    I have some symlinks from a Linux import which i can’t delete. I tried the regular delete, secure delete, getting the files out of the trash and do a chmod/chown, renaming, the ways on this site…
    Any further Ideas?

  12. André says:

    Yes, that´s better. You might want to use also the verbose option so you see can what´s going on.

    sudo rm -rfv ~/.Trash/*

  13. Derek says:

    Brilliant – this not only freed up 12 gigs, this sudo also allowed me to use regular instead of secure deletion – which somehow (I won’t hazard a specific action since I don’t know) I got locked into.
    I’ve been through literally 40 forums. The more advanced users may scoff but this issue was maddening.
    Thank you!

  14. Michelle Diamond says:

    I wish I had found this post sooner. It took me 30 days to delete a copy of my system.. (LOL)

    I have since discovered that Lion has secure trash on as a default – slows the process of emptying the trash. Deselect “secure empty trash” via finder preferences.

  15. matt says:

    Worked, thanks so much :)

  16. Nan says:

    It’s really really help, Your terminal command get rid of my problem! Thank you very much.

  17. Bob biggss says:

    The trash goes away if I eject an external hard drive.but comes back when drive restarts. The sudo command returned an error in terminal. sudo rm -rf~/.trash is this command typed correctly?

  18. Taylor says:

    I tried the sudo rm -rf ~/.Trash command in terminal but it did not work. When I try to secure empty trash and error message reading “The operation can’t be completed because you don’t have permission to access some of the items.” still pops up just as before. I’ve right clicked and gone into “Get Info” to make sure it isn’t locked and that I have permission to read and write (which I do), but it still won’t delete in the trash. Any advice?

  19. tre says:

    I tried everything! Simply went to disk utility and repair permissions, Voila!

  20. Denise says:

    Wow– I spent hours– all afternoon trying to solve the grayed out option to empty trash with no success. I started up from the original disk– downloaded other options BUT RAW TRASH ATE IT ALLLLL UP! I am so thankful for the program!!! SWAK!

  21. Baw2003 (Bryce) says:

    THANKS!!! sudo rm -rf ~/.Trash worked GREAT :)

  22. clausi says:

    great, the sudo rm -rf ~/.Trash helped to delete the trash bin
    thanks a lot

  23. Elizabeth says:

    This was the only thing that worked for me – I had 90GB in the trash

  24. lime says:

    Neither the terminal command nor using option-Empty Trash worked for me. However Booting in safe mode (holding shift while booting) did work.

  25. Lynn Watson says:

    Found this, instantly fixed it, easily!
    https://discussions.apple.com/thread/3603751

Leave a Reply