I run gpg --list-keys
and it shows me the keys present in the keyring:
/home/kshitiz/.gnupg/pubring.gpg
--------------------------------
pub 4096R/8F64D7E0 2015-02-18
uid Kshitiz Sharma (http://ksharma.in) <[email protected]>
sub 4096R/C87EAA9F 2015-02-18
sub 4096R/B63EFB4D 2015-02-18
I delete my secret key:
$ gpg --delete-secret-key [email protected]
sec 4096R/8F64D7E0 2015-02-18 Kshitiz Sharma (http://ksharma.in) <[email protected]>
Delete this key from the keyring? (y/N) y
This is a secret key! - really delete? (y/N) y
And then list keys again gpg --list-keys
. Same output:
/home/kshitiz/.gnupg/pubring.gpg
--------------------------------
pub 4096R/8F64D7E0 2015-02-18
uid Kshitiz Sharma (http://ksharma.in) <[email protected]>
sub 4096R/C87EAA9F 2015-02-18
sub 4096R/B63EFB4D 2015-02-18
Why didn't the secret key 8F64D7E0
get deleted?
Weirdly, running gpg --delete-secret-key
again says key not found:
gpg: key "[email protected]" not found: eof
gpg: [email protected]: delete key failed: eof