Pacman/Pamac - Invalid or corrupted database

Hello,
I have the following message in Pamac when I want to make an update:

Invalid or corrupted database (PGP signature) Error synchronizing databases

Then I tried the following in terminal and I get this output:

:: Paketdatenbanken werden synchronisiert …
 core                  167,1 KiB   898 KiB/s 00:00 [######################] 100%
 extra                1880,0 KiB  10,2 MiB/s 00:00 [######################] 100%
 community               7,5 MiB  12,0 MiB/s 00:01 [######################] 100%
 multilib              171,0 KiB  7,26 MiB/s 00:00 [######################] 100%
:: Vollständige Systemaktualisierung wird gestartet …
Abhängigkeiten werden aufgelöst …
Nach in Konflikt stehenden Paketen wird gesucht …

Pakete (1) matcha-gtk-theme-20221115-1

Gesamtgröße des Downloads:              6,48 MiB
Gesamtgröße der installierten Pakete:  27,24 MiB
Größendifferenz der Aktualisierung:     0,02 MiB

:: Installation fortsetzen? [J/n] j
:: Pakete werden empfangen …
 matcha-gtk-theme...     6,5 MiB  11,5 MiB/s 00:01 [######################] 100%
(1/1) Schlüssel im Schlüsselbund werden geprüft    [######################] 100%
(1/1) Paket-Integrität wird überprüft              [######################] 100%
Fehler: matcha-gtk-theme: signature from "Mark Wagie <mark@manjaro.org>" is unknown trust
:: Datei /var/cache/pacman/pkg/matcha-gtk-theme-20221115-1-any.pkg.tar.zst ist beschädigt (Ungültiges oder beschädigtes Paket (PGP-Signatur)).
Soll die Datei entfernt werden? [J/n] j
Fehler: Der Vorgang konnte nicht durchgeführt werden (Ungültiges oder beschädigtes Paket (PGP-Signatur))
Fehler sind aufgetreten, keine Pakete wurden aktualisiert.

I am aware that the problem is due to matcha-gtk-theme. How can I fix the problem?

Hi @trombonefix,

Please use the search function. If you’d have done so, you’d have found the first result is basically the same:

And it was solved:

1 Like

I think the issue is caused by the difference between pacman and pamac databases.

  • pacman stores in /var/lib/pacman/sync
  • pamac stores in /var/tmp/pamac/dbs/sync

I suggest you open a terminal and run

sudo pacman -Syyu

Thanks!
I’ve found this too, but it doesn’t work.

There are no error messages. It outputs “There is nothing to do”.

Then you’re done.

Nevertheless, in pamac still comes the message “Invalid or corrupted database (PGP signature).
Error synchronizing databases”

So, what is is? Is there an error message or not?

I think your last update was quite a while ago. Try this first: [HowTo] Work around gpg verification issue on left behind systems

If you have a corrupted or invalid database you need to remove them

sudo rm /var/tmp/pamac/dbs/sync/*.*
sudo rm /var/lib/pacman/sync/*.*

Then refresh the databases in pamac and pacman to replace them.
Its also worth noting that this happens a lot if you have a so so mirror you are syncing with. Take a look here to refine and use the best mirrors available to you. Afterwards you may have to remove the databases again and sync with the new mirror.

1 Like

The error they claim differs from the one that is shown. The databases are correct but the key for the package matcha-gtk-theme changed and is not trusted in their outdated keyring.

That is the error. Its pointing to the databases. They could be bad, the pgp signature for the package is garbled or missing, or the signature for the package doesnt match the databases because of a bad package download. It doesnt hurt to remove them, improve the mirrors and try again.

No, they claim the databases but the second snippet shows that the four databases are correctly downloaded and then it’s this one package (although in German).

They should update the keys with the link I’ve provided above.

If you look at the second post, it gives a link to similar info to what you linked to. The OP then posted it didnt help. So its on to the next possibility. In any event the steps I gave may help or not. One thing is sure, they will do no harm.

Thank you all! Finally, updating Pamac via the three point menu (update database) solved the problem.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.