Delete all TimeMachine local snapshots

Issue:

Internal boot volume is full or nearly full and the source of the data usage is the local snapshots

Cause:

When TimeMachine is configure to automatically backup, but hasn’t been able to backup to the TimeMachine destination disk.

Workaround:

Perform a backup while connected to the TimeMachine disk to allow macOS to perform a safe backup & perform maintenance on the local snapshots.

Once this is done, any local snapshots remaining can be deleted using the Terminal.

Launch Terminal and issue the command:

tmutil listlocalsnapshots /
  • tmutil is the TimeMachine command line utility
  • listlocalsnapshots does what it sounds like
  • the / is the volume where the localshotshots are stored

This will produce a list of all the locally stored snapshots that can be deleted.

You can issue the command:

sudo tmutil deletelocalsnapshots / <snapshot date / time + id string>

This command is preceded with sudo, so it will require elevation using your password.

The string after the forward slash is the numerical part between com.apple.TimeMachine. and .local

If you have a larger list and don’t want to delete them one at a time, good news, you can script this to purge all of the local snapshots using:

for x in $(tmutil listlocalsnapshots /); do sudo tmutil deletelocalsnapshots $(cut -d '.' -f 4 <<<"$x"); done

 

Leave a Reply