Mac – How to remove local snapshots on mojave

backupmojavetime-machine

Asking for a friend…

He's having issues with local snapshots being taken by Time Machine. He doesn't want to disable Time Machine entirely, but due to disk space issues causing performance issues, he wants to have local snapshots disabled – he connects to the network regularly enough that the networked time machine does backups frequently enough.

On previous versions of MacOS, he could run the command

sudo tmutil disablelocal

to only have the remote backups enabled.

This command aparrently does not work any more. What can be done to configure the system in the same way?

Best Answer

I also had problems with running out of disk space due to Time Machine/APFS local snapshots and the macOS disk purging system not working quickly enough -- I didn't find a way of disabling local snapshots, but I did find the following commands can help, if making management a little more manual.

If you want to delete all local snapshots, the following command will work -- but it's possible the next Time Machine update will take longer as it will have to work out the differences between the last Time Machine backup and the current state of the drive.

sudo tmutil deletelocalsnapshots /

If you just want to delete some local snapshots, you can try the following command, the numbers I've used are completely arbitrary, I was just trying to force it to free up some space:

 sudo tmutil thinLocalSnapshots / 1000000000 3

The first value is the purge amount (1 GB in this case) you'd like tmutil to try and reclaim, the second value is the urgency, which can be from 1 to 4. I've no idea which is more urgent, 1 or 4, it doesn't seem to be documented. If you use this command repeatedly it will delete more snapshots each time, until they're all deleted.

Related Question