Skip to content

Instantly share code, notes, and snippets.

View dpodyachev's full-sized avatar

DPodyachev dpodyachev

View GitHub Profile
@dpodyachev
dpodyachev / remove-old-snaps.sh
Created June 26, 2025 09:16 — forked from m-esm/remove-old-snaps.sh
Removes older versions of Snap applications
#!/bin/bash
# Removes old revisions of snaps
# CLOSE ALL SNAPS BEFORE RUNNING THIS
echo "Current usage:";
du -h /var/lib/snapd/snaps
echo "";
set -eu
snap list --all | awk '/disabled/{print $1, $3}' |
while read snapname revision; do