Sample Header Ad - 728x90

How to export only some public sub-keys with gpg?

2 votes
2 answers
994 views
My PGP-key follows the long-lived-mainkey-short-time-subkeys pattern. Thus I already have 12 expired subkeys attached to my mainkey. When handing out my key today, there seems to be not much reason to include the expired encryption subkeys - nobody's going to need them anymore. Is there a way to only export a few of the **public** subkeys along with the (public) mainkey? I tried to explicitly export the two current subkeys, which should provoke the mainkey to be exported alongside:
gpg -a --export   >output.file
But this command exported the complete key: mainkey with *all* subkeys.
Asked by kaba (151 rep)
Sep 8, 2023, 04:55 PM
Last activity: Jun 22, 2025, 06:32 PM