Last active
November 13, 2019 19:08
-
-
Save oxhacks/d9f499e5ae52d6306eec44bed73bf841 to your computer and use it in GitHub Desktop.
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
# Removes local Time Machine backups | |
BACKUPS=$(tmutil listlocalsnapshotdates) | |
echo Deleting local backups... | |
for d in $BACKUPS; do | |
# The first line of the output of this command is "Snapshot dates for all disks:" | |
# so we're just making sure this is a number and presumably a date. | |
if [ ${d:0:1} == 2 ]; then | |
echo $d | |
tmutil deletelocalsnapshots $d | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment