Archlinux is an awesome Linux distro, but as everything, it can be put into inconsistent state by misuse of –force flag in Arch package manager, pacman.
After trying to upgrade i received error, that some files were already existing in filesystem – it usually is a sign that your system has not been upgraded for quite a long time, since packages contents changed this much.
I thought I would be smarter than pacman and ran it with –force. After that some dependencies could not be resolved and whole system became unusable.
- Download ArchLinux ISO and write it to USB drive
- Boot Arch from pendrive
- (optional) If your root partition is encrypted, run:
# cryptsetup luksOpen /dev/sda2 myroot Enter passphrase for /dev/sda2: ********
- Mount your root partition
# mount /dev/sda2 /mnt
or, if your root partition is encrypted:
# mount /dev/mapper/myroot /mnt
- Run pacman with switches:
-r /mnt – to change root of Arch installation
–cachedir /mnt/var/cache/pacman/pkg – to change folder, where packages will be downloaded
-b /mnt/var/lib/pacman – to change pacman’s database location
–force – well 😉
# pacman -Syyu -r /mnt --cachedir /mnt/var/cache/pacman/pkg -b /mnt/var/lib/pacman --force
- Wait for pacman to complete and restart your PC