I recently had some issues with failed backups on a 4TB Seagate external hard drive – out of the blue I started getting an error that there wasn’t enough free space. The drive actually had 1.4TB free so I’m not sure why it was failing. Anyways, I decided to use Crashplan (external backup) instead. This is where the problems started. Mac Time Machine had used around 2.5TB of space on the external drive, so I wanted to permanently delete those files.
Initially I tried deleting the files by following some instructions I found in a forum that showed how to delete the Time Machine sparsebundle files. After around 8 hours it was still sitting there, possibly deleting, but I wasn’t sure and the external drive was still showing only 1.4TB free space. I tried just removing the shared folder that Time Machine had created (it was something like ‘Seagate-430D1C-backup’). All that did was, as you would probably expect, remove the link which meant I could no longer access the files from my Mac. This all happened a couple of weeks ago.
So I was sitting here this afternoon wondering if the Seagate drive was accessible via SSH and to my surprise it was. Being able to access the drive via SSH meant that I was also able to delete all of the Time Machine related files, so I’ll now explain how I did this.
WARNING WARNING WARNING WARNING WARNING
This procedure WILL permanently delete the Mac Time Machine backup files from your external drive. In order to use these instructions you should be confident using SSH and the *nix command line. The main reason I have shared these instructions is because most other suggestions I have read involved having to entirely reformat the external drive – which I didn’t want to do as I had around 1.5TB in other files and backups on the drive.
1. Make sure you have a user set up on your Seagate drive with administrative privileges. In my case, this was me.
2. Open a terminal and SSH to your Seagate drive IP using the login details for your administrator user (e.g. ssh email@example.com)
3. Enter the following commands in the terminal
First I checked what the current directory was:
I then changed to the parent directory and checked what files/directories were in there:
Public TwonkyData anonftp dbd gary gary.tm lost+found mt-daapd twonky
The ‘gary.tm’ directory was the most likely candidate to be the directory that Mac Time Machine created to store backups, so I checked to make sure:
Seagate-430D1C:/Data$ ls -al gary.tm
drwxrwxrwx 7 gary gary 65536 Feb 6 19:43 .
drwxr-xr-x 13 root root 65536 Aug 15 2014 ..
drwxrwxrwx 2 root gary 65536 Aug 12 2014 .AppleDesktop
drwxrwxrwx 2 gary gary 65536 Feb 6 13:07 .AppleDouble
-rwxrwxr– 1 gary gary 8196 Feb 6 13:06 .DS_Store
drwxrws— 4 gary gary 65536 Feb 6 10:27 Gary???s iMac.purgeable
drwxrwxrwx 3 root gary 65536 Aug 12 2014 Network Trash Folder
drwxrwxrwx 3 root gary 65536 Aug 12 2014 Temporary Items
Sure enough, it contained the ‘.purgeable’ directory which contains a ‘bands’ directory and then several thousand directories below that one. Given that my aim was to permanently delete all of these Time Machine related files and recover the space they had been taking up, my next command was:
Seagate-430D1C:/Data$ rm -rfdv gary.tm
removed gary.tm/Gary’s iMac.purgeable/bands/10124
removed gary.tm/Gary’s iMac.purgeable/bands/135bb
removed gary.tm/Gary’s iMac.purgeable/bands/1d2ff
removed gary.tm/Gary’s iMac.purgeable/bands/17306
removed gary.tm/Gary’s iMac.purgeable/bands/ddb3
removed gary.tm/Gary’s iMac.purgeable/bands/3a874
removed gary.tm/Gary’s iMac.purgeable/bands/9255
removed gary.tm/Gary’s iMac.purgeable/bands/2c1b1
It took several hours to delete all of the files and directories, but this time I was able to see the progress as I had used the -v (verbose) switch on the rm command and the free space afterwards was 3.65TB.