I had a issue with using testing repo recently, krb5 package was ahead of core. Got fed up with warning every time I updated so decided to remove it! Well that of course broke pacman.
Ok so I broke it I need to fix it. So I loaded up ArchBang live and proceeded to chroot in and see if I could fix package. Turned out to be harder than I thought. Only way I could get package to install was to build pacman-static from AUR and install krb5 using it. This worked and got system and pacman working again.
On the next big update krb5 failed to install as “exists in filesystem” errors. So off to google and try to find the answer.
As pacman no longer comes with –force option, which may have worked but is not always a good idea as other issues might need to be addressed.
Came across a possible fix in using –overwrite option, this again comes with its own risks and using it might have undesired results.
So I cannot recommend using it unless you know what you are doing.
The dangerous command that fixed my issue is:
sudo pacman -S --overwrite "*" krb5
Will break it down, -S of course install a package, –overwrite “*” overwrites all the files matched it finds exist in krb5.
Here is link to issue https://unix.stackexchange.com/questions/240252/pacman-exists-on-filesystem-error
Suffice to say I now have a working pacman again, am I dumb yes I should have checked package info before removing it.
Any fool can make a mistake, knowing how to fix it takes a master.