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

Steffen Nurpmeso steffen at sdaoden.eu
Wed Jul 3 17:30:25 CEST 2019


Teemu Likonen wrote in <87zhlvta73.fsf at iki.fi>:
 |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
 --End of <87zhlvta73.fsf at iki.fi>

Ah, thanks.  Cool!

--steffen
|
|Der Kragenbaer,                The moon bear,
|der holt sich munter           he cheerfully and one by one
|einen nach dem anderen runter  wa.ks himself off
|(By Robert Gernhardt)



More information about the Gnupg-users mailing list