📅  最后修改于: 2022-03-11 14:50:44.452000             🧑  作者: Mango
# remove all disabled snaps
LANG=C snap list --all | while read snapname ver rev trk pub notes; do if [[ $notes = *disabled* ]]; then sudo snap remove "$snapname" --revision="$rev"; fi; done
# free up space
sudo du -sh /var/lib/snapd/cache/ # Get used space
sudo rm --force /var/lib/snapd/cache/* # Remove cache