EDIT 2026-10-12: some word change to clarify that not only team keys are affected.
This bug was first reported at https://bugs.kde.org/show_bug.cgi?id=515372
Original title: Unable to completely delete incomplete team key
SUMMARY
After deleting an incomplete team key in Kleopatra (or an other key with offline primary) and then importing the public key of that (team) key, it will be found that the secret subkey of the (team) key is still present.
STEPS TO REPRODUCE this with a team key
- Create an OpenPGP key (hereinafter referred to as Key A) with the "Set up this key for shared usage in teams" option enabled.
- Save secret team key for Key A; whether the "Allow team members to sign with the team key" option is enabled or not has no effect.
- Export the public key of Key A.
- Delete Key A
- Import the secret team key A that was exported earlier (the one with the incomplete certificate).
- Delete secret team key A that was just imported.
- Import the public key of Key A.
OBSERVED RESULT
The imported key A contains its public key and a secret subkey.
EXPECTED RESULT
The imported key A contains only the public key, not the secret subkey.
SOFTWARE/OS VERSIONS
Kleopatra: Gpg4win-5.0.1
Kleopatra: 76f98d94d858d18edd22b8d26aad565b1f71671f
GnuPG: 2.5.17
Libgcrypt: 1.11.2
KDE Frameworks: 6.20.0
Qt: Using 6.10.1 and built against 6.10.1
Windows 10 Version 21H2
Build ABI: x86_64-little_endian-llp64
Kernel: winnt 10.0.19044
ADDITIONAL INFORMATION
This might be a problem with the GPG core; it's reported that using GPG commands directly makes it impossible to delete incomplete team keys.