how-to 1) remove a key, 2) avoid spam, 3) add a principal UID when delete ?

David Shaw dshaw at
Fri Jan 2 02:23:58 CET 2009

On Dec 25, 2008, at 7:04 PM, Raphaël Maville wrote:

> 1) How to delete an unpublished GnuPG key from a computer when the
> Passphrase and the Revoke file are lost ?
> This key was create without revoke file. It was not published at all  
> on
> internet or to my friends.

Since it was never distributed, then you're in luck.  You can just  
delete the key and be done with it.

   gpg --delete-secret-and-public-keys (yourkey)

> 2) How to avoid spaming to my mail boxes, is it better to do not  
> mention
> it on a gnuPG key ?

This a matter of debate.  I don't think that spammers really care  
about OpenPGP keys in particular.  In practice, the number of email  
addresses on the keyservers aren't that great compared to other places  
they pull addresses from.  The spammers might vacuum up some addresses  
if someone links to the keyserver from a web page, but I doubt the  
keyservers are being targeted specifically.  For most people, the  
benefits of having an email address on your key outweigh the minor  
risk of getting a few extra pieces of spam.

> 3) How to add a "principal" uid to a key ?
> I had removed the principal UID because I wanted to modify the  
> firstname
> ("trema" not well prompted). And then I can only add sub-uid.

If there is only one UID, then it is the primary UID and you don't  
need to do anything.  If there are multiple UIDs, then you can pick  
one to tag as the primary via --edit-key.  That said, "primary"  
doesn't really do very much - it's mainly a visual option so that the  
chosen UID appears first in the list.


More information about the Gnupg-users mailing list