9

I was going to delete the Time Machine backups. I made a mistake and instead of deleting them using Time Machine, I just moved the Backups.backupdb folder to the trash. Now, if I try to empty the trash, Finder attempts to count the number of files that will be deleted, and this process is incredibly time-consuming, because the Finder tries to count each file in each backup. The same thing happens if I try to move the Backups.backupdb folder from the trash back on my hard drive where it was before.

What can I do in this situation? How can I delete the backups?

5
  • Do you use the (probably) external drive exclusively for Time Machine backups? If so, is your Mac the only machine backed up or do you use the external drive to also backup other Macs?
    – klanomath
    Commented Jun 25, 2016 at 22:32
  • @klanomath Thank you, I used an external drive for backups but I also keep a lot of files on this drive. My Mac is the only machine that was backed up.
    – Rumata
    Commented Jun 25, 2016 at 22:53
  • So just formatting/erasing it is no option!
    – klanomath
    Commented Jun 25, 2016 at 22:55
  • @klanomath Do you mean formatting the Mac or the external drive?..
    – Rumata
    Commented Jun 25, 2016 at 23:02
  • I meant the external drive - but I already wrote an answer.
    – klanomath
    Commented Jun 25, 2016 at 23:48

3 Answers 3

12

To remove or move the Backups.backupdb folder open Terminal.app.

  • Enter cd /Volumes/<Name_of_BackupDrive>/.Trashes to change the working directory. <Name_of_BackupDrive> has to be the volume name of your TM backup volume.
  • Enter sudo ls -laO to show all folders. Usually you should see only one folder with the name 501 now:

    d-wx-wx-wt@ 3 root      wheel  hidden 102 Jun 25 20:52 .
    drwxrwxr-x  9 root      admin  -      374 Jun 26 01:21 ..
    drwx------@ 2 user      staff  hidden  68 Jun 26 01:21 501
    
  • Enter sudo su to get super user rights.
  • Enter cd 501 (Replace 501 with whatever the name of the directory is) to change the working directory and list the content of the folder 501 with ls -laO. Now you should see the folder Backups.backupdb:

    drwx------@ 3 user      staff  hidden 102 Jun 26 01:21 .
    d-wx-wx-wt@ 3 root      wheel  hidden 102 Jun 25 20:52 ..
    drwxr-xr-x  2 user      admin  -       68 Jun 26 01:19 Backups.backupdb
    
  • Now you may either move the folder back to the root of the backup drive with:

    mv Backups.backupdb /Volumes/<Name_of_BackupDrive>/
    

    or remove the folder with

    rm -dR Backups.backupdb
    

    If you are asked to override something (e.g. override rw-r--r-- root/wheel uchg for Backups.backupdb/.RecoverySets/0/com.apple.recovery.boot/boot.efi?) enter yes and hit the return button. You may also add the -f option to skip confirmations.


To delete a 30 GB backup in a virtual machine it took about 3 minutes. So depending on the size of Backups.backupdb some patience is needed.

1
  • It worked fine, it took like 1 hour to delete 280 gb.
    – OJVM
    Commented Jun 28, 2017 at 19:57
0

You can also try to delete the trash with help of the free program Onyx: http://www.titanium.free.fr/onyx.html You open the program and gå to "clean", then to "Trash" and then click on "delete". The program will delete the content in the Trash for all connected volumes (for example Time Machine).

2
  • 2
    How does it do this differently from Finder?
    – mmmmmm
    Commented Dec 14, 2016 at 11:36
  • Thanks very much for the answer, I was looking how to delete thise files, ONYXmakes the magic in ONE GO.
    – user248484
    Commented Jul 22, 2017 at 15:35
0

First off, thank you so much for the help! I just wanted to include a few steps that were different for my setup- just in case it can help someone else.

I was using a WD external backup drive:

  1. Go to the root folder, where you can get to the Volumes directory:
    • cd ../..
  2. Change to the volumes directory:
    • cd Volumes/My\ Passport
  3. View all folders:
    • sudo ls -laO
  4. Get super user rights:
    • sudo su 5 Look for the .Trashes directory and change into it.
    • Each director is listed at the end of each line.
    • cd .Trashes
  5. List the contents of the .Trashes directory:
    • ls -laO
  6. Look for a 501 folder and remove it:
    • rm -dR 501
1
  • 1
    On behalf of an anonymous user: "open teminal type sudo chmod -R 777 "drag and drop one folder or file from trash bin" press enter type in password if asked. it takes about 3 min to execute the command. again type sudo rm -R " drag and drop the same file." press enter enter password if asked. takes time 3 mins approx. this should work as i tried many options only this worked for me. if successful repeat the commands by dragging and dropping all the files that are to be deleted. both steps are required."
    – JMY1000
    Commented Aug 23, 2017 at 19:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .