#!/bin/bash

command -v snap >/dev/null || exit 0

snap list --all | awk '/disabled|désactivé/{print $1, $3}' | while read snapname revision; do snap remove "$snapname" --revision="$revision"; done
rm -rf /var/lib/snapd/cache/*
snap set system refresh.retain=2

exit 0
