Saturday, February 20, 2010

Problems emptying the Trash folder after deleting Time Machine backups

Yesterday i found that my 1.5TB external drive was running short on space so my first thought was that the i might have some old backups that could be deleted - I have used the drive also as my Time Machine backup for the last year. What i did next was bad i recommend you avoid! I went to the 'Backups.backupdb' folder, saw a bunch of timestamped folders going back into last year and dropped them into my trash folder - i didn't realise how unwise this move was until i tried emptying said folder - after 2 hours of trying to delete it's content, i was still getting nowhere so i had to turn the machine off, stopping the trash emptying didn't cut it. I tried fixing the problem by putting back the backups and deleting them individually but the machine wouldn't let me do that because the files were backup files and they apparently couldn't be put back. I then did some rummaging and found an article that proved to be useful:

Emptying the trash: an epic journey

Here, Dave let the machine take it's time - 13 hours later he was done...

there needed to be another way, surely? In the blog post, Dave mentions that using the terminal to trash items takes ALOT less time, i did some more digging and found this invaluable article: (Trash problems in OS X? Reset it!)

I found that the following command soothed my woes:

sudo rm -rf /Volumes/insert external disk name here/.Trashes

PLEASE read all of the cnet article before you try this though - it notes a word of warning that if you put a space before '/.Trashes' in your command, you'll nuke all the data on the disk so be careful but it does seem to have done the trick for me!

Note, if you need to delete individual things from Time Machine in the future, follow this path instead of deleting it directly from the Finder!

1 comment:

failedidealist said...

I've had the same problem , albeit with 200GB not 1.5TB of backups.

Problem arises from TImeMachine itself, it will fill any available space on an HDD, and wait until entirely full before deleting any backups. (why it doesn't just delete them as it goes along i don't understand).

Rather than delving into the dark wilderness of the OS X terminal, i'd recommend using this app:

it's a simple Applescript that does the same thing as the terminal command, but will not fuck you over if a mistake is made!