Skip to content

Commit

Permalink
Add bin/clean_old_snap_versions
Browse files Browse the repository at this point in the history
  • Loading branch information
n1amr committed Sep 1, 2023
1 parent bbdfeae commit 6c85ad4
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions bin/clean_old_snap_versions
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

set -eu

LANG=C snap list --all |
awk '/disabled/{print $1, $3}' |
while read snapname revision; do
echo snap remove "$snapname" --revision="$revision"
done

0 comments on commit 6c85ad4

Please sign in to comment.