macOS Delete All Local Snapshots

Single line at shell prompt …

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

In a bash/zsh script …

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

Author: gruvin

Born anatomically male, of a largely uninteresting bipedal, carbon based species, during the ninth moon orbit of the one thousand, nine hundred and seventy first meaningfully recorded solar orbital cycle (according to Gregory) of a small blue planet, situated near the outer edge of a seemingly long forgotten galaxy, located at the precise centre of its universe. In short; — I am. Therefore, I am.

Leave a Reply

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