error: database 'arcolinux_repo' is not valid

error: database 'arcolinux_repo' is not valid

Note: This is specific to ArcoLinux distro

If you get an error like so:

error: database 'arcolinux_repo' is not valid (invalid or corrupted database (PGP signature))
error: database 'arcolinux_repo_3party' is not valid (invalid or corrupted database (PGP signature))
error: database 'arcolinux_repo_xlarge' is not valid (invalid or corrupted database (PGP signature))

And running fixkeys and installing archlinux-keyring etc did not solve your issue, it typically means that the database is installed in more than one location.

You can find the locations where these repos have been synced and remove them manually. To do that:

sudo find / -type f -name "arcolinux_repo.db" 2>/dev/null

I got two locations in the standard output:

/var/lib/pacman/sync/arcolinux_repo.db
/var/lib/PackageKit/alpm/sync/arcolinux_repo.db

You might have more locations where these repos are synced. You will need to remove these sync directories like so:

sudo rm -rf /var/lib/pacman/sync
sudo rm -rf /var/lib/PackageKit/alpm/sync

And then run:

fixkeys

If you run into any errors, it would typically be related to "Trust" issues with keys not verified. In such situations, you can temporarily edit /etc/pacman.conf and set the SigLevel = TrustAll for all [arcolinux_*] directives and re-run fixkeys again.

Once keys are fixed, you can update pacman like usual:

sudo pacman -Syu

If you had to make any changes to SigLevel in /etc/pacman.conf as described above, now is the time to reverse them by setting SigLevel = Required DatabaseOptional for all [arcolinux_*] directives.