4

I just bought a new Mac and I'm manually migrating everything over given that it's been a while since I did a clean install and that the new Mac has less storage than my existing one. I will be wiping the old Mac after I do the migration.

However, I have about 600GB worth of Time Machine backups for the old Mac on the NAS which I'd like to shrink to make space for Time Machine on the new Mac. I just want the latest Time Machine backup to serve as an archive in case I forget to move some files when I wipe the old Mac.

Is it possible to (easily) delete all but the latest snapshot of the Time Machine backup?

Thanks

4

Assuming OSX 10.8 or later, you could use a combination of find and tmutil

tmutil delete <path> will remove the snapshot at <path>

while

find /path/to/backups/ -maxdepth 1 will list all of your backup snapshots. The last one ( Latest ) is a link to the latest one. You can be a little creative and use find /path/to/backups -name 2\* -maxdepth 1 to list only the "real" directories (all the dates which start with 2014, etc). And, finally, (thanks to this link) you can get a list of all but the last snapshot:

find /path/to/backups -name 2\* -maxdepth 1 | sed \$d
  • 1
    It might be easier to use tmutil listbackups to get a list of all snapshots (which then can get passed to tmutil delete directly) – nohillside Nov 19 '14 at 9:28
  • Good point-- I'll update the answer. Forgot about the listbackups command. – Kent Nov 19 '14 at 9:44
  • 1
    But wait -- doesn't listbackups only work for the current machine and not another machines snapshots? – Kent Nov 19 '14 at 9:45
  • Ah, maybe, can't try that though. – nohillside Nov 19 '14 at 11:23
  • 1
    I just set up a test here, and sure enough it only shows the current computer's snapshots. tmutil help listbackups outputs "Print paths to all of this computer's completed backups" (emphasis added). So, even though the find/sed flow is contrived, it may be the easiest way to do what the OP wants. – Kent Nov 20 '14 at 7:27

You must log in to answer this question.

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