macOS Delete All Local Snapshots

Single line at shell prompt …

$ for i in tmutil listlocalsnapshots / | egrep -o '\d{4}-\d{2}-\d{2}-\d+'; do sudo tmutil deletelocalsnapshots $i; done

In a bash/zsh script …

#!/bin/bash
for i in tmutil listlocalsnapshots / | egrep -o '\d{4}-\d{2}-\d{2}-\d+'
do
    sudo tmutil deletelocalsnapshots $i
done

About

Born suspiciously male on a small blue planet during its one thousand nine hundred and seventy first orbit chasing an unremarkable star in a galaxy tucked away at the edge of the universe where nothing of much interest happens and even less is remembered.

Leave a Reply

Your email address will not be published. Required fields are marked *

*