Created
September 21, 2021 20:12
-
-
Save rafael-neri/38a04fbb46a3b601ffd21a9c5611c820 to your computer and use it in GitHub Desktop.
Sanp Clean: Remove disabled (unused) snap packages
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 | |
set -eu | |
snap list --all | awk '/disabled/{print $1, $3}' | | |
while read snapname revision; do | |
sudo snap remove "$snapname" --revision="$revision" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment