Created
January 14, 2025 13:57
-
-
Save CHERTS/42f9393145d6fe21698bd39011819f44 to your computer and use it in GitHub Desktop.
Remove all unused version of snap packages
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 | |
LANG=en_US.UTF-8 snap list --all | awk '/disabled/{print $1, $3}' | | |
while read pkg revision; do | |
sudo snap remove "$pkg" --revision="$revision" | |
done | |
journalctl --vacuum-size=100M |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment