GPG keys' directory

Hey!
I want to know where all GPG keys that I added are located on my computer.
And also, will all the GPG keys on my computer be deleted after reinstalling Manjaro or installing another distro/DE?

https://wiki.archlinux.org/index.php/GnuPG#Directory_location

Only if you don’t back them up. :wink:

1 Like

Thank you for quick response!
I also wanted to know what are these keys used for and can it affect my computer in the bad way (maybe by sharing the viruses etc.)? Because I accidentally tried to install another key, that I didn’t need (key by Fernando Azenha if it makes any sense) and, I think, fortunately, something went wrong and it wasn’t added to my computer, as I understood.

Keys 1-10 of 169 for ā€œFINGERPRINTā€. Enter number(s), N)ext, or Q)uit > 1
gpg: key AED5AD4E48DF3F80: ā€œFernando Azenha fazenha@fingerprint.com.brā€ not changed
gpg: Total number processed: 1
gpg: unchanged: 1

So I want to know if I can catch any viruses or other unwanted software to my computer by accidentally installing unknown key.

Well, remove it then. See man gpg.

The thing is that I tried, but it says like it wasn’t installed:

[frowyy@LenovoV510-15IKB Downloads]$ gpg --delete-keys Fernando Azenha
gpg (GnuPG) 2.2.27; Copyright (C) 2021 Free Software Foundation, Inc.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.


pub  rsa3072/AED5AD4E48DF3F80 2021-02-09 Fernando Azenha <fazenha@fingerprint.com.br>

Delete this key from the keyring? (y/N) y
gpg: key "Azenha" not found: Not found
gpg: Azenha: delete key failed: Not found
[frowyy@LenovoV510-15IKB Downloads]$ 

Maybe it just didn’t install? Because another key, that I wanted to install, was processed, but instead of ā€œunchangedā€ there was ā€œimportedā€ and then everything went good.

Keys 1-10 of 169 for ā€œFINGERPRINTā€. Enter number(s), N)ext, or Q)uit > 1
gpg: key AED5AD4E48DF3F80: ā€œFernando Azenha fazenha@fingerprint.com.brā€ not changed
gpg: Total number processed: 1
gpg: unchanged: 1

And can GPG’s and GPG keys contain in itself any viruses or any unwanted software? Because I can’t find any information on this topic.

Thanks for help! I appreciate it!

Try:

gpg --delete-keys "Fernando Azenha"

Or:

gpg --delete-keys AED5AD4E48DF3F80

No. See:

1 Like

Thanks for the reply!

I made some research and understood that GPG is pretty much the same as PGP, but made for GNU/Linux. So all the rules must apply to GPG too?

I will try those commands to delete the key, but anyway I’m going to reinstall my OS so it must be deleted after it.

Now I’m curious in one thing, what can happen if your key is not secure? Will it provide less security (it’s obviousšŸ˜‚) or what exactly?

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.