How to Remove a GPG Key from CentOS 7 - rharmonson/richtech GitHub Wiki

How to Remove a GPG Key from CentOS 7

The Process

  1. List installed keys
  2. Identify key
  3. Remove key

Step 1

[root@node1 ~]# rpm -qa gpg-pubkey
gpg-pubkey-f4a80eb5-53a7ff4b
gpg-pubkey-fe590cb7-533d77ee
gpg-pubkey-352c64e5-52ae6884

Step 2

[root@node1 ~]# rpm -qi gpg-pubkey-fe590cb7-533d77ee
Name        : gpg-pubkey
Version     : fe590cb7
Release     : 533d77ee
Architecture: (none)
Install Date: Mon 21 Mar 2016 07:50:16 AM PDT
Group       : Public Keys
Size        : 0
License     : pubkey
Signature   : (none)
Source RPM  : (none)
Build Date  : Thu 03 Apr 2014 08:02:06 AM PDT
Build Host  : localhost
Relocations : (not relocatable)
Packager    : oVirt <[email protected]>
Summary     : gpg(oVirt <[email protected]>)
Description :

Step 3

[root@node1 ~]# rpm -e --allmatches gpg-pubkey-fe590cb7-533d77ee

Done!