Skip to content

Instantly share code, notes, and snippets.

@danilogco
Last active September 28, 2023 23:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danilogco/a6c39dbfd5a5b0947cb4d031a980aa0f to your computer and use it in GitHub Desktop.
Save danilogco/a6c39dbfd5a5b0947cb4d031a980aa0f to your computer and use it in GitHub Desktop.
Simple script to clean Manjaro temporary files
# 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