I'm trying to copy my gpg related files over from an old machine to a new one.

I've worked out how to copy the keys over: How to import secret gpg key (copied from one machine to another)? but this leaves me with gpg complaining that it doesn't trust the imported keys.

How do I transfer the trust db from one machine to another?


You can copy ~/.gnupg/trustdb.gpg from one machine to another.

You can also export the ownertrust values (which are the ones that matter) and import them on the new machine:

gpg --export-ownertrust > otrust.txt

rm ~/.gnupg/trustdb.gpg
gpg --import-ownertrust < otrust.txt

See the gpg manpage for details (although the version on the website doesn't say much more than I have).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.