Delete secret key without public key

André Ludwig andre at
Sat Mar 20 15:17:55 CET 2010

I've got a secret key which is useless (ID AB756AEB) and I want to delete it from my keyring. This secret key has no associated public key. The problem is, that it only shows up in the gpg2 --edit-key mode after typing "toggle" followed by return. It doesn't show up on gpg2 --list-secret-keys.
I read the FAQ and found this:
So I tried out to find the long keyID for my problematic secret key. But the "--use-colons"-option doesn't really work with --edit-key after a "toggle", it only gives me my user IDs. "gpg2 --delete-secret-key AB756AEB" doesn't work either.
So how can I get the long keyID or how can I delete this secret-key?

Please add me as CC in replies to this Mail.

Thank you very much,

shematic output:

$ gpg2 --help
gpg (GnuPG/MacGPG2) 2.0.14
libgcrypt 1.4.5
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

$ gpg2 --edit-key andre
Geheimer Schlüssel ist vorhanden.

pub  1024D/ACA3438B  erzeugt: 2003-12-05  verfällt: niemals     Aufruf: SC  
                     Vertrauen: uneingeschränkt Gültigkeit: uneingeschränkt
sub  1536g/7469868B  erzeugt: 2003-12-05  verfallen: 2010-03-08  Aufruf: E   
sub  2048g/8605C6C9  erzeugt: 2010-03-07  verfällt: 2012-03-06  Aufruf: E   
[ uneing.] (1). André Ludwig <andre at>
[widerrufen] (2)  André Ludwig <andre at>
[ uneing.] (3)  André Ludwig <andre-ludwig at>
[ uneing.] (4)  André Ludwig <Ludwiga at>

Befehl> toggle
sec  1024D/ACA3438B  erzeugt: 2003-12-05  verfällt: niemals   
ssb  1536g/7469868B  erzeugt: 2003-12-05  verfällt: niemals   
ssb  2048g/AB756AEB  erzeugt: 2010-03-07  verfällt: niemals  <<<<<<<<<<<<<<<<<<<<<<<<<<< WANT TO DELETE THIS ONE
ssb  2048g/8605C6C9  erzeugt: 2010-03-07  verfällt: niemals   
(1)  André Ludwig <andre at>
(2)  André Ludwig <andre-ludwig at>
(3)  André Ludwig <andre at>

$ gpg2 --with-colons --list-keys andre
uid:u::::1267979329::3332EBD5F03657462C477121634ACECA1B92423F::André Ludwig <andre at>:
uid:r::::::C27A194598C48F51B5829D63E8A4ED95C71F6DE9::André Ludwig <andre at>:
uid:u::::1267979337::9FBFE293AE50491B3A9D79825E2EC28E0DA3C8EE::André Ludwig <andre-ludwig at>:
uid:u::::1267979337::D26CA709DCA720197ECFF757A1D118968B041E9E::André Ludwig <Ludwiga at>:

$ gpg2 --with-colons --list-secret-keys andre
uid:::::1267979329::3332EBD5F03657462C477121634ACECA1B92423F::André Ludwig <andre at>:
uid:::::::C27A194598C48F51B5829D63E8A4ED95C71F6DE9::André Ludwig <andre at>:
uid:::::1267979337::9FBFE293AE50491B3A9D79825E2EC28E0DA3C8EE::André Ludwig <andre-ludwig at>:
uid:::::1267979337::D26CA709DCA720197ECFF757A1D118968B041E9E::André Ludwig <Ludwiga at>:

$ gpg2 --with-colons --edit-key andre
Geheimer Schlüssel ist vorhanden.

uid:u::::::::André Ludwig <andre at>:::S9 S8 S7 S3 S2 H2 H3 Z2 Z1,mdc,no-ks-modify:1,p:
uid:r::::::::André Ludwig <andre at>:::,no-ks-modify:2,r:
uid:u::::::::André Ludwig <andre-ludwig at>:::S9 S8 S7 S3 S2 H2 H3 Z2 Z1,mdc,no-ks-modify:3,:
uid:u::::::::André Ludwig <Ludwiga at>:::S9 S8 S7 S3 S2 H2 H8 H3 Z2 Z3 Z1,mdc,no-ks-modify:4,:

Befehl> toggle
uid:u::::::::André Ludwig <andre at>::::1,:
uid:u::::::::André Ludwig <andre-ludwig at>::::2,:
uid:u::::::::André Ludwig <andre at>::::3,:

-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 203 bytes
Desc: Signierter Teil der Nachricht
URL: </pipermail/attachments/20100320/267748fd/attachment.pgp>

More information about the Gnupg-users mailing list