Created
September 29, 2021 00:48
-
-
Save rizqikazukun/eecfbca2aaca62990c6986b944df0bc7 to your computer and use it in GitHub Desktop.
This is bash script for removing unused snap package
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 | |
snap remove "$snapname" --revision="$revision" | |
done | |
# Source : https://askubuntu.com/questions/1036633/how-to-remove-disabled-unused-snap-packages-with-a-single-line-of-command |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment