mirror of
https://github.com/balkian/dotfiles.git
synced 2024-11-05 05:01:43 +00:00
script to remove old snap packages
This commit is contained in:
parent
7ec07febf3
commit
bc1b20a0aa
9
scripts/.bin/remove-old-snaps.sh
Normal file
9
scripts/.bin/remove-old-snaps.sh
Normal file
@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
# Removes old revisions of snaps
|
||||
# CLOSE ALL SNAPS BEFORE RUNNING THIS
|
||||
set -eu
|
||||
|
||||
LANG=C snap list --all | awk '/disabled/{print $1, $3}' |
|
||||
while read snapname revision; do
|
||||
snap remove "$snapname" --revision="$revision"
|
||||
done
|
Loading…
Reference in New Issue
Block a user