The other day while updating one of my machines, the power plug fell out while downloading the packages to be updated (unplugging a deceased rodent was the final straw but it must have worked loose over time).
After removing the database lock file, I was and to rerun pacman -Syu but all of the packages then reported an invalid PGP signature!
I was able to correct the problem by following the instructions in this thread.
I am however mystified as to why a power interrupt should cause such a problem, especially during the download phase. It might make sense if the fail was in the install phase, or for a single package (the one being downloaded).
The file systems all have some protection against problems after a power failure.
However, this protection varies depending on the file system.
FAT has next to no protection.
Other file systems use log files and/or checksums. Sometimes this helps to restore a previous good situation. (but not always)
Some file systems can create snapshots. Then a rollback to ābefore the updateā is possible
Something like this works, for example, with Timeshift / snapper and btrfs.
Thanks for the ideas.
I was really only wondering if there was an obvious reason, rather than asking anyone for a deep dive into the issue, thatās why I didnāt put any details.
FWIW: journalctl for the relevant boot had only one line ā a complaint about unable to enumerate a USB device (i.e. the dead rodent). And the FS is EXT4.
Logs and other information are what we generally rely on to find the likely cause of an issue, obvious or not; as is said āthe devil is in the detailsā. Without that, weāre mostly peeing into the wind.
If interrupted during the download phase, an update can usually be recovered without any great issue; you obviously realize that. However, itās always possible a loss of power will affect something else in your system. Just what may have been affected, is a little harder to guess.
A cache issue as suggested by @linux-aarhus is as plausible as anything else. The following links may be helpful in that regard: