Last active
September 28, 2023 23:02
-
-
Save danilogco/a6c39dbfd5a5b0947cb4d031a980aa0f to your computer and use it in GitHub Desktop.
Simple script to clean Manjaro temporary files
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
# Vacuum journals | |
sudo journalctl --vacuum-size=500M && sudo journalctl --vacuum-time=7d | |
# Remove all uninstalled packages | |
sudo paccache -rvuk0 | |
# Remove old installed packages, leave 3 | |
sudo paccache -rvk3 | |
# Clean yay cache | |
yay -Sc -a | |
# Clean pamac build cache | |
pamac clean -bv | |
find ~/.cache/ -type f -atime +100 -delete | |
# Clean temporary build files | |
rm -rf ~/{.bundle,.cargo,.cmake,.dotnet,.electron,.electron-gyp,.gem,.gradle,.lazarus,.node-gyp,.npm,.nuget,.nvm,.racket,.rustup,.stack,.yarn} || true | |
rm -rf ~/.cache/{electron,electron-builder,go-build,node-gyp,pip,yarn} || true | |
sudo rm -rf ~/go || true | |
# Find files not owned by any package | |
sudo lostfiles |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment