28 Nov 2017

How to remove all local snapshots in macOS High Sierra

If you are using macOS High Sierra and want to delete all your local snapshots, use the following command:

sudo tmutil listlocalsnapshots / | awk -F. '{ system("sudo tmutil deletelocalsnapshots "  $4); }'

Where:

    sudo tmutil listlocalsnapshots /


List of all local snapshots in form:

    com.apple.TimeMachine.2017-11-27-142931
    com.apple.TimeMachine.2017-11-27-152919
    com.apple.TimeMachine.2017-11-27-163113
    com.apple.TimeMachine.2017-11-27-173243
    com.apple.TimeMachine.2017-11-27-183511
    com.apple.TimeMachine.2017-11-27-193725
    com.apple.TimeMachine.2017-11-27-203137

        ...

The command:

    awk -F. { print $4; }

Will print date part.

And command:

    sudo tmutil deletelocalsnapshots

will delete given date.

 And don't forget to reboot after deleting.