Skip to content

Commit

Permalink
Update zap-snapshots.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
Austcool-Walker authored Oct 31, 2020
1 parent 93e169b commit 4058de7
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions payloads/zap-snapshots.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,14 @@ then
fi
fi

for XID in `diskutil apfs listSnapshots "$VOLUME"|fgrep XID|awk '{print $3}'`
#Snapshot deletion code by StarPlayrX 2020
snapshots=$(diskutil apfs listsnapshots "$VOLUME" | grep +-- | sed 's/^.\{4\}//')

for uuid in $snapshots
do
echo $XID
diskutil apfs deleteSnapshot "$VOLUME" -xid $XID
printf '📸 Attempting to delete snapshot => '
echo $uuid
echo ''

diskutil apfs deletesnapshot "$VOLUME" -uuid $uuid
done

0 comments on commit 4058de7

Please # to comment.