Last active
January 4, 2023 13:50
-
-
Save emepetres/f9f1533de22b0dfca6f2eaa9635a0718 to your computer and use it in GitHub Desktop.
Manjaro maintenance script
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
| #!/bin/bash | |
| # https://wiki.manjaro.org/index.php?title=System_Maintenance | |
| # automatically purge all .cache files that have not been accessed in 100 days | |
| sudo find ~/.cache/ -type f -atime +100 -delete | |
| # remove all but the most recent entries by size or time | |
| sudo journalctl --vacuum-size=50M | |
| sudo journalctl --vacuum-time=7d | |
| # remove orphans | |
| sudo pacman --noconfirm -Rs $(pacman -Qdtq) | |
| # clear the cache of packages that are no longer installed | |
| sudo pacman -Sc --noconfirm | |
| # clear yay cache | |
| yay -Sc -a --noconfirm |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It may be necessary to clean build packages when upgrading from yay