I'm a Debian user. I just created my own GPG public key. I'm just wondering if I re-install Linux on my system, is it possible to use the original GPG key or do I have to create a new one?

NOTE: If you know any good example sites for using the GPG key, it would be very helpful.

1 Answer 1


Delete the file ~/.gnupg/random_seed. Then make a backup of the whole directory ~/.gnupg/. Copy it back after reinstalling the OS.

Take care to securely erase the files on the backup storage if other people might get access to it (e.g. if it's a USB stick).

Usually /home is put on a separate volume so that the user data is not affected by an OS change.

  • How do you securely erase a USB stick? It'd be better to store it on an encrypted filesystem.
    – Johnny
    Nov 26, 2014 at 17:25
  • @Hauke Laging, When I visit some blog site, then I saw the GPG key. Is there any reason to show their own GPG key to people ? Nov 27, 2014 at 18:01
  • 1
    @Changju.rhee You obviously have to read some very basic stuff about asymmetric crypto. emailselfdefense.fsf.org/en Nov 27, 2014 at 19:51

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.