Created
June 18, 2024 07:46
-
-
Save peterroth/2906a7f4c82b699339e0d8c44b16313b to your computer and use it in GitHub Desktop.
Remove unused snaps on Ubuntu
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/sh | |
set -eu | |
LANG=C | |
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