Created
January 31, 2024 08:36
-
-
Save matsest/26eec31e72d700b47646249146b36bb7 to your computer and use it in GitHub Desktop.
Clean old Snap revisions
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/bash | |
# Removes old revisions of snaps | |
# CLOSE ALL SNAPS BEFORE RUNNING THIS | |
set -eu | |
snap list --all | awk '/disabled/{print $1, $3}' | | |
while read snapname revision; do | |
snap remove "$snapname" --revision="$revision" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment