Last active
November 27, 2018 11:22
-
-
Save xd547/a7f9b040c90a43840ba0be4ce7a5328a to your computer and use it in GitHub Desktop.
Delete all localsnapshots expect last one.
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 | |
echo 'Delete all local snapshots expect last one.' | |
for date in $(tmutil listlocalsnapshots / | cut -d. -f4 | sed '$d') | |
do | |
tmutil deletelocalsnapshots $date | |
done | |
echo 'Thinlocalsnapshots' | |
tmutil thinlocalsnapshots / |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment