Mac maintenance
How to Use tmutil to Manage Time Machine From the Terminal
Use tmutil on macOS to start, stop, inspect, and prune Time Machine backups from the Terminal — with examples for Sonoma and Sequoia.
Time Machine is one of the few Apple apps where the GUI hides what you actually want. Want to see how big your last backup was? Open the menu bar icon, hover, hope. Want to delete one specific snapshot to recover space? Good luck. Want to exclude a folder you forgot at setup? Buried.
tmutil is the Terminal interface to Time Machine, and it’s where you go when the menu bar isn’t enough.
See what Time Machine is doing right now
tmutil status
If a backup is running, you’ll get a dictionary of fields including Running = 1, Phase, Percent, bytes copied so far, and the total expected bytes. Phase strings like Copying, ThinningPostBackup, MountingBackupVolume tell you which stage you’re in.
If nothing’s running:
{
Running = 0;
}
For a one-line check you can drop in a script:
tmutil status | grep -q "Running = 1" && echo "Backing up" || echo "Idle"
Start, stop, and skip a backup
tmutil startbackup
Runs a backup right now to whatever destination(s) you’ve configured. Add --block to make the command wait for the backup to finish:
tmutil startbackup --block
That’s useful before a major OS upgrade or before unplugging the backup drive.
tmutil stopbackup
Aborts the current backup. Time Machine will retry on the next scheduled interval.
To skip the next backup without disabling the schedule entirely, there’s no built-in for that — just turn Time Machine off briefly:
sudo tmutil disable
# wait for the moment to pass, then:
sudo tmutil enable
disable and enable toggle the automatic backup schedule. Manual startbackup calls still work either way.
List your backup destinations
tmutil destinationinfo
Outputs a section for every configured backup destination — local disk, network share, multiple drives if you’ve got them. Each has a Name, a Kind (Local, Network), an ID, and a Mount Point.
To add or remove destinations, use System Settings — tmutil can’t add a new destination, only manage existing ones.
Inspect backups on the destination
When the destination is mounted:
tmutil listbackups
You get a list of paths, one per backup, looking like:
/Volumes/Backup/Backups.backupdb/MacBook Pro/2026-04-21-093115
The trailing string is the snapshot timestamp. To see the latest:
tmutil latestbackup
To see how big each backup actually is on disk:
tmutil calculatedrift /Volumes/Backup/Backups.backupdb/MacBook\ Pro/2026-04-20-031022 \
/Volumes/Backup/Backups.backupdb/MacBook\ Pro/2026-04-21-093115
That returns the data difference between two backups, which is the closest thing Apple gives you to “how big was that incremental.” Useful for figuring out which backup blew up your disk usage.
Local snapshots (the hidden disk eater)
Even when your backup drive is unplugged, macOS keeps “local snapshots” of recent backups on your boot drive. They use APFS snapshots, so they cost relatively little — until they don’t.
tmutil listlocalsnapshots /
You’ll see entries like:
com.apple.TimeMachine.2026-04-22-031517.local
To delete one:
sudo tmutil deletelocalsnapshots 2026-04-22-031517
Pass just the date portion (after com.apple.TimeMachine. and before .local).
To wipe all local snapshots in one shot:
for d in $(tmutil listlocalsnapshots / | awk -F'.' '{print $4}'); do
sudo tmutil deletelocalsnapshots $d
done
macOS will rebuild local snapshots over the next few hours of normal use. They auto-purge when free space drops below a threshold, so you don’t need to delete them manually — but if you’re scrambling to free space right now, this can recover 50+ GB instantly.
Delete a specific full backup
When the destination is plugged in:
sudo tmutil delete -p "/Volumes/Backup/Backups.backupdb/MacBook Pro/2025-01-15-021111"
That removes a full backup. Time Machine will reconcile its index on the next backup. The -p flag specifies a path (post-Sonoma; older syntax used positional args).
For network destinations (.sparsebundle or APFS-style backups), the syntax is the same — tmutil resolves the actual disk paths internally.
Add and remove exclusions
You can exclude paths from being backed up without going into System Settings:
sudo tmutil addexclusion -p ~/Library/Caches
sudo tmutil addexclusion -p /Users/you/VirtualMachines
Use absolute paths. The -p flag means “this path, regardless of where it moves.” Without -p, the exclusion is by path and identity, so moving the file to a new location re-includes it.
Remove an exclusion:
sudo tmutil removeexclusion -p ~/Library/Caches
To list current exclusions:
sudo tmutil isexcluded ~/Library/Caches
That returns whether a specific path is excluded. There’s no built-in “list all exclusions” — you have to check paths one by one. Or grep the underlying property list:
sudo tmutil compare /
compare shows the file-level diff between the running system and the most recent backup, which incidentally surfaces the exclusion list.
Comparing the live system to a backup
Want to know what you’d lose if you restored right now?
tmutil compare /
That diffs your live system against the latest backup. The output shows file additions, deletions, and modifications, with sizes. Useful before a destructive operation.
You can also compare two specific backups:
tmutil compare /Volumes/Backup/Backups.backupdb/MacBook\ Pro/2026-04-15-031022 \
/Volumes/Backup/Backups.backupdb/MacBook\ Pro/2026-04-22-031517
This is read-only and doesn’t touch any data — just a diff.
Restore a specific file
tmutil restore /Volumes/Backup/Backups.backupdb/MacBook\ Pro/2026-04-15-031022/Macintosh\ HD/Users/you/Documents/important.pdf \
/Users/you/Desktop/recovered.pdf
Source first, destination second. The restored file’s metadata (timestamps, ownership, ACLs) is preserved.
This is the headless equivalent of using the Time Machine browser UI to scrub through history and click “Restore.” Faster when you know what you want.
Verify a backup
sudo tmutil verifychecksums /Volumes/Backup/Backups.backupdb/MacBook\ Pro/2026-04-22-031517
Walks the backup and verifies file checksums. Slow — could take hours on a multi-TB backup — but worth running if you suspect bit rot on the destination drive.
What’s eating my backup space?
If your Time Machine destination is filling up faster than you expect, the usual suspect is a single large file that changes constantly. Each change spawns a new copy in the next backup.
tmutil compare /Volumes/Backup/Backups.backupdb/MacBook\ Pro/2026-04-15-031022 \
/Volumes/Backup/Backups.backupdb/MacBook\ Pro/2026-04-22-031517 | \
sort -k2 -h | tail -30
Sorts the diff by size. The biggest diffs are the things eating your backups. Common culprits: VM disk images, virtualenv .venv directories, Docker volumes, large .psd files saved hundreds of times. Add them to the exclusion list.
Inheriting backups when migrating Macs
When you replace a MacBook and want the new one to continue using the same Time Machine destination:
sudo tmutil inheritbackup /Volumes/Backup/Backups.backupdb/Old\ Mac
This claims the old Mac’s backups for the new Mac. Used to be necessary; on recent macOS versions Time Machine often handles inheritance automatically, but this is the manual hammer if it doesn’t.
Apple Silicon and APFS specifics
On Apple Silicon Macs and APFS-formatted destinations, Time Machine uses APFS snapshots rather than the older HFS+ hard-link soup. Most tmutil commands work identically, but a few notes:
tmutil thinlocalsnapshots /runs the snapshot pruner manually. macOS does this automatically when free space gets low.tmutil uniquesize <path>returns the unique-to-this-snapshot size for an APFS snapshot. It’s the equivalent of “how much space would I free by deleting just this one?”- The old
Backups.backupdbfolder structure is gone on APFS destinations; backups appear as snapshots in/Volumes/<destination>/<machine name>/.
Logging and troubleshooting
Time Machine logs go to the unified log. To see recent activity:
log show --predicate 'subsystem == "com.apple.TimeMachine"' --last 1h
Filter further by adding --info for verbose entries or --debug for everything. Useful when a backup is failing without explanation — the logs almost always tell you why (destination unreachable, permission issue, etc.).
A reasonable maintenance routine
Once a month:
# Check the most recent backup actually finished
tmutil latestbackup
# Look for crashing local snapshots filling your disk
tmutil listlocalsnapshots / | wc -l
# See if anything new should be excluded
du -sh ~/Library/Containers/* 2>/dev/null | sort -h | tail
Once a year:
sudo tmutil verifychecksums <oldest_backup_path>
Time Machine is mostly fire-and-forget, which is why it’s easy to forget when something quietly went wrong. tmutil status once a week is a 1-second sanity check that catches most “my backup hasn’t happened in three months” situations before you actually need the backup.