Last active
October 22, 2024 14:27
-
-
Save benms/7209f51037243b495350ef7bf50bd5aa to your computer and use it in GitHub Desktop.
Clean old packages snap
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo sh -c 'apt update; apt upgrade; apt dist-upgrade; apt autoremove; apt purge $(dpkg -l | awk '\''$1=="rc"{print $2}'\''); apt install $(dpkg -l | awk '\''$1=="ii"{print $2}'\''); apt clean; snap refresh; LANG=C snap list --all | awk '\''$6=="disabled"{print $1, $3}'\'' | while read snapname revision; do snap remove "$snapname" --revision="$revision"; done' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment