Skip to content

Instantly share code, notes, and snippets.

@emepetres
Last active January 4, 2023 13:50
Show Gist options
  • Select an option

  • Save emepetres/f9f1533de22b0dfca6f2eaa9635a0718 to your computer and use it in GitHub Desktop.

Select an option

Save emepetres/f9f1533de22b0dfca6f2eaa9635a0718 to your computer and use it in GitHub Desktop.
Manjaro maintenance script
#!/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
@emepetres

Copy link
Copy Markdown
Author

It may be necessary to clean build packages when upgrading from yay

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment