Here’s what I do to minimize breakage.
My system is on btrfs, with snapper and snap-pac creating snapshots before/after updates. Obviously that’s a personal choice, and not one you can change without starting fresh, but it can be useful to boot a broken system, so mentioning it. But the main things, that anyone can do…
I use checkupdates frequently.
How many packages need updating?
checkupdates | wc -l
Is there a new keyring?
checkupdates | grep ring
If there is a new archlinux-keyring…
Look at the old/new version. If you check frequently and notice there is one-version-newer, it’s a very good idea to update now.
If it’s been a while and you see archlinux-keyring would skip over a version, STOP, jump forward to where I describe how to handle that.
Before updating, I always run…
checkupdates -d
It downloads packages to cache, but does not update the main pacman database. If you have an internet outage while it’s downloading, it’s safe to checkupdates -d again until it succeeds.
As soon as checkupdates -d completes successfully, run the usual…
sudo pacman -Syu
It will go much more quickly because it doesn’t have to download anything.
*** If archlinux-keyring has skipped a version ***
Use the arch linux archive. Instructions for that are elsewhere, but basically:
- Find the date the next keyring appeared, configure so pacman uses that date, update (as before, including checkupdates -d)
- Continue the above until you have the latest keyring
- Revert to normal mirrors and update one last time
Seems like a lot of work, but not really unless you have skipped a keyring. Just checkupdates every few days and then you decide when to actually update.
I have a laptop I forget about and have to do this occasionally. But on my main machines, I check frequently and update whenever there’s 100-200 packages, or a new keyring.
Pick and choose what you like from this. There are of course other ways. It’s just what I do, after a few “broken” arch updates over the past several years. But definitely check out checkupdates if you haven’t used it before.