Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
How to remove keys from Hockeypuck OpenPGP key server

How to remove keys from Hockeypuck OpenPGP key server

  • First find the Hockeypuck hash of the key(s) to be removed via the web search of your key server instance;
  • On the index, copy the hash value (Hash=HASHVALUE) (it's the hex representation of MD5);
  • Connect to the PostgreSQL interface of your Hockeypuck server;
    • psql hkp
    • Find the corresponding keys from their hash value;
    • select rfingerprint from keys where md5 in ('HASHVALUE');
    • This will return the corresponding fingerprints;
    • Then delete the associated sub-keys;
    • delete from subkeys where rfingerprint in ('RFINGERPRINT');
    • Then delete the main keys;
    • delete from keys where md5 in ('HASHVALUE');
  • Then add the fingerprints in the Hockeypuck server blacklist to avoid reconciliation of the removed keys from other servers;
  • The black-list feature was introduced in Hockeypuck 2.1.0 release;

Blacklist example for hockeypuck


Can a user remove their own keys in Hockeypuck? or someone in possession of the private keys?

Yes. It's documented in HIP-1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment