Skip to content

Latest commit

 

History

History
13 lines (11 loc) · 293 Bytes

SYSTEM--remove_old_snaps.md

File metadata and controls

13 lines (11 loc) · 293 Bytes

remove old snasps

#!/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
      sudo snap remove "$snapname" --revision="$revision"
    done