Skip to content

Instantly share code, notes, and snippets.

@tejasbubane
Created December 19, 2020 19:28
Show Gist options
  • Save tejasbubane/3897c43f9851f53cf7ef2fb114fa9405 to your computer and use it in GitHub Desktop.
Save tejasbubane/3897c43f9851f53cf7ef2fb114fa9405 to your computer and use it in GitHub Desktop.
Arch system maintenance
# No need to run this everyday - once a month should be fine
# Remove cache:
sudo pacman -Scc
yay -Scc
# Remove unwanted dependencies:
yay -Yc
# Remove orphan packages
sudo pacman -Qtdq | sudo pacman -Rns
# Cleanup cache:
du -sh ~/.cache
rm -rf ~/.cache/*
# Clean the journal:
du -sh /var/log/journal
sudo journalctl vacuum-time=1weeks
# Update mirrors
sudo reflector -c India -c Singapore -c France -c Germany --age 12 --completion-percent 100 --protocol https --sort rate --verbose --save /etc/pacman.d/mirrorlist
# Update packages:
sudo pacman -Syyu
yay -Syu --devel --timeupdate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment