1
0
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:
J. Fernando Sánchez 2022-09-06 12:59:56 +02:00
parent 7ec07febf3
commit bc1b20a0aa

View 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