GPG Feature import-clean

You GnuPG keyring got a little bit messy over time? Than you’re not alone - I transferred my keyring from computer to computer since I use GnuPG so it contains more than thousands of keys. The trustdb calculation takes minutes to complete so it’s time for an housekeeping task.

Maybe unknown GnuPG feature is import-clean which allow you to cleanup your keyring and remove unusable signatures.

  After import, compact (remove all signatures except the self-signature)
  any user IDs from the new key that are not usable.  Then, remove any
  signatures from the new key that are not usable.
  This includes signatures that were issued by keys that are not present
  on the keyring.

You should do it by refreshing all keys from the keyserver:

gpg --no-options --keyserver pgp.mit.edu \
    --keyserver-options import-clean,export-clean --refresh-keys

After I’ve used the above command my trustdb calculation time is decreased a lot.

Send your comment by mail.