Isso está documentado na página do pacman do wiki :
In the case that pacman crashes with a "database write" error while removing packages, and reinstalling or upgrading packages fails thereafter, do the following:
- Boot using the Arch installation media. Preferably use a recent media so that the pacman version matches/is newer than the system.
- Mount the system's root filesystem, e.g. mount
/dev/sdaX /mnt
as root, and check the mount has sufficient space withdf -h
- Mount the proc, sys and dev filesystems as well:
mount -t proc proc /mnt/proc; mount --rbind /sys /mnt/sys; mount --rbind /dev /mnt/dev
- If the system uses default database and directory locations, you can now update the system's pacman database and upgrade it via
pacman --sysroot /mnt -Syyu
as root.- After the upgrade, one way to double-check for not upgraded but still broken packages:
find /mnt/usr/lib -size 0
- Followed by a re-install of any still broken package via
pacman --sysroot /mnt -S package
.