keyserver-options: self-sigs-only, import-clean, import-minimal

Teemu Likonen tlikonen at iki.fi
Wed Jul 3 17:22:08 CEST 2019


Steffen Nurpmeso [2019-07-03 17:08:32+02:00] wrote:

> My question: is there any better way than a shell script over
> --list-keys --with-colon | grep ^pub | ...etc... to "minimize" keys in
> my keyring (with gpg1)?

It seems that there is no better way than scripting it. My "--edit-key +
clean" script is below. It can be changed to "minimize".


#!/bin/sh
gpg --batch --with-colons --list-keys | awk -F: '
$1 == "pub" {pub = 1}
pub == 1 && $1 == "fpr" {printf "%s clean save\n", $10; pub = 0}' | \
	xargs -n3 -- gpg --batch --no-auto-check-trustdb --edit-key
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 487 bytes
Desc: not available
URL: <https://lists.gnupg.org/pipermail/gnupg-users/attachments/20190703/c46cc817/attachment.sig>


More information about the Gnupg-users mailing list