Advertisement
huezohuezo1990

clean-snap.sh

Jan 5th, 2024
1,204
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.25 KB | None | 0 0
  1. #!/bin/bash
  2. # Removes old revisions of snaps
  3. # CLOSE ALL SNAPS BEFORE RUNNING THIS
  4. set -eu
  5. snap list --all | awk '/disabled/{print $1, $3}' |
  6.     while read snapname revision; do
  7.         snap remove "$snapname" --revision="$revision"
  8.     done
  9.  
Advertisement
Comments
Add Comment
Please, Sign In to add comment
Advertisement