MacOS – How to wipe certain files from Time Machine Backups history but keep recent copies of them in case of a full restore

macostime-machine

I like Time Machine simplicity but I'd like to make it a little more space efficient: since system updates, apps updates etc change GBs, I'd like to exclude these only from older backups, keeping the last 5 or so backups full, bootable backups.

For instance: Let's say I have 3 time machine backups:

  • 2016-12-08-225622
    • Applications
    • Library
    • System
    • Users
  • 2016-12-09-225622
    • Applications
    • Library
    • System
    • Users
  • 2016-12-10-225622
    • Applications
    • Library
    • System
    • Users

I want to be able to wipe Applications, Library, System… from the first two backups and be able to keep only their latest version, in this case 2016-12-10-225622. So it would look like this after the "cleanup":

  • 2016-12-08-225622
    • Users
  • 2016-12-09-225622
    • Users
  • 2016-12-10-225622
    • Applications
    • Library
    • System
    • Users

This would be similar to excluding system files from time machine + using a boot clone, except you can get some bootable history if you want to (ie. keep the last 5 versions bootable).

It also works for other folders: what about keeping the Downloads folder history of the last month but not from the last year? This is a middle ground between excluding files and folders and keeping them.

Best Answer

Time Machine doesn't create bootable backups in the first place, and apart from the initial one they're not "full" either.

Individual folders/files as not valid targets for tmutil delete anyways, so selectively deleting parts of snapshots like you want is not possible. But that doesn't matter much since system and app updates are infrequent enough and small enough I can guarantee they're absolutely dwarfed by your general day-to-day ~ throughput.

If you're tight on space and want to optimize what you need to do is get BackupLoupe and look for anything that frequently takes up a lot of space in your snapshots. Cache files are already excluded automatically but some apps do put stuff in ~/Library/Application Support that effectively is cache, without being marked as such. Usually gets flagged correctly eventually but I've kept some Spotify and Chrome databases excluded, for example.