Unable to Empty Trash and Delete Time Machine Backups? Here’s How to Fix That

Aug 12, 2013 - 8 Comments

Empty the Trash when Time Machine backups won't delete

Despite Time Machine being a remarkable solution for easy backups, a peculiar issue can arise for some Time Machine users that causes the OS X Trash to not be able to empty when the backup drive is connected to the Mac. This will usually manifest itself as the following; a user attempts to empty the Trash, the Trash either refuses to empty, or gets stuck on “Preparing to empty the Trash…” which then counts up to several hundred thousand (or more) files. Left alone, the Trash will sometimes start deleting after a few hours of counting the files, but it goes so slow that you can literally wait a day or more for the Trash to delete – hardly practical.

Infinitely counting Trash items when Time Machine backups are deleted

This is obviously a quirk or bug, and it seems to happen either when someone attempts to manually remove backups to create extra space on a hard drive, or when an ancient backup gets corrupted when Time Machine is attempting to perform housekeeping. This issue was was supposedly resolved in a past OS X update, but nonetheless it continues on in Mountain Lion and Mavericks, perhaps because the files that are causing the problem are often much older, typically from OS X Lion and before.

OK enough discussion of the problem and some background, let’s get to the solution so that you can empty the Trash can again and remove those old stubborn Time Machine backups once and for all.

Manually Empty Trash when Time Machine Backup Files are Stuck

This requires the use of force delete through the Terminal, which makes it a bit more advanced. If you don’t know what you’re doing or are not comfortable with Terminal you may want to skip this entirely and just wait out the incredibly lengthy Trash deletion through Finder instead. Proceed at your own risk.

Be sure to issue commands precisely otherwise you may unintentionally delete files you do not want to remove, this is very important because the Terminal does not prompt you for approval or confirmation, it simply deletes everything.

  • Connect the Time Machine drive to the Mac and (temporarily) stop any existing Time Machine backups
  • Open Terminal, found within /Applications/Utilities/ and then enter the following command to change the active directory to that of the Time Machine backup drive:
  • cd /Volumes/(backup drive name)/.Trashes/

    For example to change directory to a backup drive named “Mac Backups” the command would be:

    cd /Volumes/Mac\ Backups/.Trashes/

  • Confirm you’re in the proper location by listing the contents of the .Trashes/ folder, this will usually reveal a ‘501’ subfolder, which contains the stubborn Backups.backupdb files. You can double-check you’re in the right place with sudo ls:
  • sudo ls 501/

    Note: Under some circumstances, the 501 folder will not exist, or it will be named something else. Sometimes .Trashes contains the backupdb files directly as well. If you do not find the 501/ directory, just delete the contents of .Trashes/ instead. We’re going to focus on .Trashes/501/ to be as verbose as possible with the intention on reducing errors with rm command.

  • Now to delete the contents of the .Trashes 501 folder using the rm command. Be sure to have the correct syntax in use here otherwise you may accidentally delete something you do not want. The rm command does not ask for confirmation, it simply deletes files.
  • sudo rm -rf 501/Backups.backupdb/

    Enter the administrator password when requested to begin deleting the .Trashes/501/Backup.backupdb/ files

  • Let the Terminal sit and do it’s thing, there is no visible activity but typically that files will be removed within 2-15 minutes at most, exit out of Terminal when finished
  • Confirm Trash is working as intended again by emptying it as usual in the OS X Finder

Advanced users only: shorter syntax version to Trash stuck Time Machine backups

A much shorter version of the above process can be achieved by eliminating some of the safeguards used in the above steps. Only use this command if you are comfortable with the Terminal, replacing “BackupDriveName” with the name of the hard drive in question:

sudo rm -rf /Volumes/BackupDriveName/.Trashes/*

Forcibly delete Time Machine backups from the Trash

If the reason you are attempting to delete old backups is to free up space for other media, consider partitioning the backup drive so that a section is devoted to Time Machine while the rest is available for direct file storage. This will prevent the need to manually remove the Time Machine backups in order to make room for files and hopefully prevent this issue from ever arising at all.

Additionally, keep in mind that if you use redundant Time Machine backups you may need to perform this process on both backup drives.

Thanks to Max H for the tip idea

Enjoy this tip? Subscribe to the OSXDaily newsletter to get more of our great Apple tips, tricks, and important news delivered to your inbox! Enter your email address below:

Related articles:

Posted by: Paul Horowitz in Mac OS X, Tips & Tricks, Troubleshooting


» Comments RSS Feed

  1. gary says:

    doesn’t work for me.

    sudo rm -rf …. issue the command and it just comes straight back to the prompt having done nothing.

    I can ls the directory and see the backups I want to delete but rm does not work

  2. Dave says:

    same – does nothing for me.

  3. Johnny says:

    This worked for me. Thank you!!!!

  4. thanks! says:

    This worked with a trick I learned from another website. I had the Terminal open and I had the trash open and could see the folders I wanted to delete from old time machine backups (from machines I don’t use). You can type “rm -rf ” and then drag and drop the folder into the Terminal windows and the path will be copied over. This ensures you are deleting the right folder and you don’t typo the command.

  5. Eran says:

    Boot your computer as “root” user and you’ll be free to do whatever you want without permission limitations on your computer, external hard drives etc.
    Here is how to boot as “root”: http://support.apple.com/en-us/HT204012
    You’ll be wise to:
    1. First backup your computer
    2. As a root user, don’t mess with items if you are not 100% sore you are not damaging anything!

  6. AL says:

    For me the folder was named 502.

    Also I had to login as root first, because my user has no sodu rights.

    Let’s say the current user “aUser” has normal rights and “rUser” has root/admin rights then do:

    1. open terminal
    2. su rUser
    3. sudo su
    4. cd /Volumes/(backup drive name)/.Trashes/
    5. ls -la
    (now you will see directories like 501, 502 …)
    6. now delete what you want:
    rm -rf 501/Backups.backupdb/
    rm -rf 502/Backups.backupdb/

    If these are empty (for me the 501 was completely empty) then the rm-command will return immediately without doing anything.

  7. CaptainComplexity says:

    Simply eject the drive and connect it to another Mac,if it is ejectable and if you have another Mac, that is. Then trash away!

    • Denise says:

      WOW, read tons and tons of stuff trying to take care of this issue, tried tons and tons of things they said to do to no avail…..and this tiny trick was the fix! As soon as I ejected the drive, boom, they were gone. THANKS!

Leave a Reply


Shop for Apple & Mac Deals on Amazon.com

Subscribe to OSXDaily

Subscribe to RSS Subscribe to Twitter Feed Follow on Facebook Subscribe to eMail Updates