1

Just started using Manjaro and pacman. I attempted an install of sublime-text using the pacman install instructions and seem to have added a dodgy key. When I try an perform another command I keep getting something like:

Preparing...
Synchronizing package databases...
Refreshing core.db...
Refreshing extra.db...
Refreshing multilib.db...
Refreshing sublime-text.db...
Downloading subli (sublime)...
Failed to prepare transaction:
invalid or corrupted database
Error: sublime-text.db.sig: sublime-text: signature from "Sublime HQ Pty Ltd <[email protected]>" is unknown trust
invalid or corrupted database (PGP signature)

To be honest at this stage I'm not even that bothered about being able to use sublime-text, just trying to get to a place where I can use the package manager. Any ideas? How would I go about removing this key?

1 Answers1

1

So not only did I have to delete the key but also the signature from my database.

The steps I followed to clean my database was as follows:

  1. Run pacman-key --list-keys, identify the key that you want to remove and copy it's id (the string of characters between the pub and uid lines).
  2. Delete the key with: pacman-key --delete {id}
  3. Run pacman-key --list-sigs, identify the corresponding signiture and copy it's id (the string of characters on the left-hand side).
  4. Delete the signiture with: pacman-key --delete {id}
  5. Refresh your keys with pacman-key --refresh-keys

That fixed my db and allowed me to install through pacman again.

  • I had this exact problem. I ran your steps 1 to 3, couldn't find the signature corresponding to sublime, tried to skip to step 5 and got some errors, tried to update the database (`sudo pacman -Sy`) and got some errors, went to the sublime text website, re-installed the GPG keys with the provided command (`curl -O https://download.sublimetext.com/sublimehq-pub.gpg && sudo pacman-key --add sublimehq-pub.gpg && sudo pacman-key --lsign-key 8A8F901A && rm sublimehq-pub.gpg`), tried again updating the data base (`sudo pacman -Sy`) and it's working. Putting that here in case it helps someone. – MacroController Jun 14 '21 at 21:38