Skip to content

Instantly share code, notes, and snippets.

@tomkinsc
Created February 8, 2025 03:40
Show Gist options
  • Save tomkinsc/abc6108dcf5caa2a2df7c98959009b0e to your computer and use it in GitHub Desktop.
Save tomkinsc/abc6108dcf5caa2a2df7c98959009b0e to your computer and use it in GitHub Desktop.
#!/bin/sh
set -eu
# from https://askubuntu.com/a/1536468
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