I'm installing a piece of software for which I had to use a third-party repository. After adding the repository with rpm -Uvh http://[site], I installed with yum install [package]. One of the prompts that came up during installation read:

Importing GPG key 0xABCABCAB "Fname Lname <email@somewhere.com>" from /etc/pki/rpm-gpg/RPM-GPG-KEY-somewhere-fname
Is this ok [y/N]: y

Does anyone know where this key is stored? I'm finished with that particular repo and don't want the additional repo/key lingering unnecessarily on my machine. I've already tried gpg --list-keys as both a regular user and root, but the key isn't listed there.

As a work around would simply removing the repo also remove the key associated with it?

link|improve this question

80% accept rate
feedback

3 Answers

up vote 5 down vote accepted

It's stored in the rpmdb, with the name of gpg-pubkey and the version as the first 8 hexadecimal characters of the fingerprint.

link|improve this answer
feedback

From rpmkey manual page:


An imported public key is carried in a header, and key ring management is performed exactly like package management. For example, all currently imported public keys can be displayed by:

rpm -qa gpg-pubkey*

Details about a specific public key, when imported, can be displayed by querying. Here's information about the Red Hat GPG/DSA key:

rpm -qi gpg-pubkey-db42a60e

Finally, public keys can be erased after importing just like packages. Here's how to remove the Red Hat GPG/DSA key

rpm -e gpg-pubkey-db42a60e

link|improve this answer
thanks for the additional info, I ended up using "rpm -qa gpg-pubkey* | xargs rpm -qi" to see complete info on all the keys (a little sloppy, but it got the job done), then removed the one I didn't want installed. – Joshc1107 Jan 18 at 14:58
feedback

While Ignacio is correct, it isn't guaranteed ... and may well change in the future. Your best bet is to install the "yum-plugin-keys" package, and use the "yum keys" etc. commands.

Also note that RHEL-6.2+ yum has per. CA keys, so that is already different.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.