Created
September 9, 2020 16:48
-
-
Save josefglatz/ca995d5e707b08501f0ee9f7cb01bfb4 to your computer and use it in GitHub Desktop.
This file contains hidden or 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/bash | |
# | |
# at.supseven.jglatz.deleteapfssnapshots 1.0.0 | |
# | |
# Deletes all APFS Snapshots. | |
# 2020 Josef Glatz | |
# | |
echo | |
echo "Local Snapshots:" | |
echo | |
tmutil listlocalsnapshots / | |
echo | |
echo "Deleting all Snapshots. This can take a while ..." | |
echo | |
for d in $(tmutil listlocalsnapshotdates|sed -n '1!p'); do tmutil deletelocalsnapshots $d; done | |
echo | |
echo | |
echo "Local Snapshots case-sensitive volume:" | |
echo | |
tmutil listlocalsnapshots /Volumes/CS | |
echo | |
echo "Deleting all Snapshots. This can take a while ..." | |
echo | |
for d in $(tmutil listlocalsnapshotdates /Volumes/CS|sed -n '1!p'); do tmutil deletelocalsnapshots $d; done | |
echo "DONE!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment