Deleting all but the most recent Time Machine backup

Solution 1:

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