Last active
December 5, 2019 07:35
-
-
Save VictorGob/be4e5dc6fe9ca27f633dfb9383f2a143 to your computer and use it in GitHub Desktop.
Revisions
-
VictorGob revised this gist
Dec 5, 2019 . No changes.There are no files selected for viewing
-
VictorGob created this gist
Dec 5, 2019 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,15 @@ #!/bin/bash # Removes old revisions of snaps # CLOSE ALL SNAPS BEFORE RUNNING THIS set -eu if [ $EUID != 0 ]; then sudo "$0" "$@" exit $? fi sudo snap list --all | awk '/desactivado/{print $1, $3}' | while read snapname revision; do snap remove "$snapname" --revision="$revision" done