Created
January 11, 2022 16:47
-
-
Save storskegg/67fbb48701043a60d1603d060431123c to your computer and use it in GitHub Desktop.
Deletes all local Time Machine backups in MacOS 12.1 (and maybe other versions)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# list local snapshots for `/`, filter output to grab snapshot timestamps, and pass them one at a time to tmutil | |
# to delete them. | |
# | |
# you may need to elevate your privelleges using sudo, but i found that on my single user laptop i didn't have to | |
tmutil listlocalsnapshots / | grep -Eo '\d\d\d\d-\d\d-\d\d-\d+' | xargs -n1 tmutil deletelocalsnapshots |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment