cohoe / workstation

Ansible scripts to configure desktop workstations.
4 stars 2 forks source link

Snapd Prune #112

Closed cohoe closed 2 years ago

cohoe commented 2 years ago

https://www.linuxuprising.com/2019/04/how-to-remove-old-snap-versions-to-free.html

cohoe commented 2 years ago
#!/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
        snap remove "$snapname" --revision="$revision"
    done