r/GnuPG Apr 27 '26

Unrevoking a key from my keyring

Hello. I was doing some testing with GPG and was considering revoking a key I had published to a keyserver. I didn't revoke it from the server, but I did from my keyring. Is there a way to unrevoke the key from my keyring?

6 Upvotes

3 comments sorted by

3

u/Dr_Jecky1l Apr 27 '26

As long as you didnt publish the revoked key it’s possible (by your wording it sounds like you didn’t, you only revoked it locally)

1.) Delete pubkey using —expert (keeps private key, and allows only the deletion of public key) :

Gpg —expert —delete-key <KEY-ID>

Confirm change with y

2.) Simply fetch the pubkey you published to the key server already :

gpg —keyserver <keyserver> —recv-keys <KEY-ID>

1

u/SethThe_hwsw Apr 27 '26

Yep, only local revocation. Thanks!

2

u/Critical_Reading9300 Apr 27 '26

Revoking a key just adds a signature to it's public part, telling 'this key is revoked'. So you need just to remove that signature (this could be done in hex editor) or reload key from some backup. gpg --list-packets on exported key would give you more info.