Skip to content

Instantly share code, notes, and snippets.

@pushcx
Created July 24, 2022 15:22
Show Gist options
  • Save pushcx/c62250740d871f1a0e8b8af1e91345f8 to your computer and use it in GitHub Desktop.
Save pushcx/c62250740d871f1a0e8b8af1e91345f8 to your computer and use it in GitHub Desktop.
~/.bin/archupdate
#!/usr/bin/env bash
# aura -C pkg -- to downgrade a package
# aura -Li pkg -- to print install/update log
# aura -Pa -- to audit PKGBUILDs (slow, s)
# aura -Qo file -- what package owns file
# aura -Ql pkg -- what files are in package
set -e # exit on error
set -o xtrace # print commands
# check db integrity (paranoia, never seen an issue)
aura -Dk
# remove orphan packages
aura -Oj
# update arch packages
aura -Syyu
# keep running kernel modules if kernel updated
# I will never stop rolling my eyes that pacman deletes modules for the running
# kernel when even rm has learned not to do the obviously awful mistake
/root/archlinux-update-modules/archlinux-update-modules --dont-ask
# reduce cache to last single version
aura -Cc 1 --noconfirm
# update AUR packages
aura -Akuax --noconfirm
# recheck db integrity (paranoia, never seen an issue)
aura -Dk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment