script to clean my keyring

oryann9 oryann9 at
Wed Oct 31 00:05:35 CET 2007

What causes your key-ring to become "dirty" or "fragmented?"

> Michael wrote:
> I like to clean my key ring automatically. I have put the attached
> together to do this. But something is wrong, the script shows the
> which need to be changed but the update is not saved. Experts, what
> wrong here??
> for i in `gpg --list-keys --fixed-list-mode --with-colons |
> grep "^pub" | cut -f5 -d":"` ; do
>                 gpg --batch --yes --edit-key $i clean
> done

> How about doing it this way:
>    cp pubring.gpg pubring.tmp
 >   gpg --import-options import-clean --import pubring.tmp

> And a general Question: 
> I like to frequently run "gpg --refresh-key" and after this the above
> script, in case it works, to get rid of the overhead. Do you think
> is a good idea to do so?

    gpg --keyserver-options import-clean \
      --keyserver refresh-keys

Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 

More information about the Gnupg-users mailing list