Loading...

Import and remove gpg key with rpm

:heavy_exclamation_mark: This post is older than a year. Consider some information might not be accurate anymore. :heavy_exclamation_mark:

Got to check out Elasticsearch Curator. Elastic use the PGP key D88E42B4. Since working with RHEL 7 I had to use rpm and yum for installing packages.

Install or import the public key into the keyring:

rpm --import https://packages.elastic.co/GPG-KEY-elasticsearch

After the Proof of Concept I perform a cleanup and remove the key.

Query installed keys:

root@omega:~# rpm -q gpg-pubkey
gpg-pubkey-fd431d51-4ae0493b
gpg-pubkey-352c64e5-52ae6884
gpg-pubkey-5ce2d476-50be41ba
gpg-pubkey-2fa658e0-45700c69
gpg-pubkey-b1275ea3-546d1808
gpg-pubkey-bfdbb0c6-54c7ee8b
gpg-pubkey-de57bfbe-53a9be98
gpg-pubkey-d88e42b4-52371eca

The last key in the list is the imported one of elastic. Remove it with:

rpm --erase --allmatches gpg-pubkey-d88e42b4-52371eca
Please remember the terms for blog comments.