Skip to content

Instantly share code, notes, and snippets.

@mthri
Created May 4, 2021 20:53
Show Gist options
  • Save mthri/3424aeb60814f196e50708944ed53ad1 to your computer and use it in GitHub Desktop.
Save mthri/3424aeb60814f196e50708944ed53ad1 to your computer and use it in GitHub Desktop.
Remove Old Snap Versions
#!/bin/bash
# Removes old revisions of snaps
# CLOSE ALL SNAPS BEFORE RUNNING THIS
set -eu
LANG=en_US.UTF-8 snap list --all | awk '/disabled/{print $1, $3}' |
while read snapname revision; do
snap remove "$snapname" --revision="$revision"
done
@mthri
Copy link
Author

mthri commented Jul 2, 2021

also remove unused pack with: flatpak uninstall --unused

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment