Sub topic 7
Excluding items to save space
This chapter assumes you have already turned on Time Machine and completed a first backup. You should be comfortable with Finder and with running simple commands in Terminal. Excluding items keeps large, replaceable data out of your backups, so the disk holds more history.
What Time Machine skips on its own
Time Machine already leaves out some things. These include caches, the Trash, and system files that macOS can rebuild. You don't need to exclude them yourself.
Why exclude anything else
Backup space is limited. Some data is large and easy to get again, and some changes constantly. Backing it up fills the disk and shortens how far back you can restore. Common candidates:
- Downloaded installers and disk images
- Virtual machine files that change on every run
- Media you can download again
- Build folders and dependency folders such as
node_modules - Files already stored safely elsewhere, such as a cloud service
Don't exclude anything you can't replace. If you are unsure, leave it in.
Excluding with System Settings
- Open System Settings and go to General, then Time Machine.
- Click Options.
- Click the add button (+) under the exclusion list.
- Choose a folder or drive and click Exclude.
- Click Done.
To remove an exclusion, select it in the list and click the remove button (−).
Time Machine shows an estimate of the space your backup needs. Check it after adding exclusions to see the effect.
Excluding with tmutil
The tmutil tool does the same job from Terminal. This example excludes a folder, then asks Time Machine whether it is excluded.
tmutil addexclusion ~/Downloads/large-files
tmutil isexcluded ~/Downloads/large-filesThe second command prints [Excluded] followed by the path when the exclusion is active. Use it to confirm the change took effect.
Two kinds of exclusion
The two kinds differ in what they follow. The table compares them.
| Kind | How you set it | What it follows |
|---|---|---|
| Sticky (default) | `tmutil addexclusion path` | The item, even if you move it |
| Fixed path | `tmutil addexclusion -p path` | The location only |
Items you add in System Settings behave as fixed-path exclusions. Items you add with plain tmutil addexclusion are sticky.
Common mistakes
- Expecting space back right away. Excluding an item stops future backups of it. Copies already in older backups stay until they age out or you delete them.
- Excluding a whole drive by accident. Check the path before you confirm.
- Forgetting an exclusion. If a file is missing during a restore, review the exclusion list first.
Exercise
Exercise
You excluded ~/Movies/raw-footage last week, but your backup disk is still almost full. Why did the exclusion not free space, and what does tmutil isexcluded tell you?
Show answer
Excluding only stops new backups of the folder. Earlier backups that already contain it remain until Time Machine thins them out. Running tmutil isexcluded ~/Movies/raw-footage prints [Excluded] and the path if the exclusion is active. That confirms the setting is correct, and the disk will gain space as the old backups age out.