11
2
It's accident generated a bulk of secret keys (without public key) in the GPG key ring, and I have written a script to delete those keys, but GPG doesn't allow me to do that:
$ gpg --batch --yes --delete-secret-keys KEYS
gpg: can't do this in batch mod
gpg: (unless you specify the key by fingerprint)
well I know what I'm doing and I know there may be duplicated key-id(s), but there seems no way to force to delete them, though the following doesn't work, too:
$ yes | gpg --delete-secret-keys KEYS
Any idea?
Great! I thought the fingerprint is only available in public keys. – Xiè Jìléi – 2010-08-11T09:47:25.047
Oops! I'm wrong, the fingerprint couldn't be fetched from, the command yeilds:
In fact, I'm just wondering why `yes | ...' doesn't work, and I think the only way is patch on gpg. Thanks – Xiè Jìléi – 2010-08-11T09:56:54.527