Last active
January 17, 2022 19:51
-
-
Save cuckookernel/b99cb02cec3b00d04f0a42d99267af8e to your computer and use it in GitHub Desktop.
This file contains 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
# remove unsused packages | |
sudo apt-get autoremove | |
# clean APT cache | |
sudo apt-get clean | |
# clean oldish journal logs | |
sudo journalctl --vacuum-time=1d | |
# remove old versions of snap packages | |
echo " | |
#!/bin/bash | |
# Removes old revisions of snaps | |
# CLOSE ALL SNAPS BEFORE RUNNING THIS | |
set -eu | |
snap list --all | awk '/disabled/{print \$1, \$3}' | | |
while read snapname revision; do | |
snap remove "$snapname" --revision="$revision" | |
done | |
" >> ./remove_snaps.sh | |
chmod a+x remove_snaps.sh | |
sudo ./remove_snaps.sh | |
# clean thumbnail cache | |
rm -rf ~/.cache/thumbnails/* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment