Steps to reproduce:
- insert someone's smartcard into your computer and use that to decrypt a file
- remove the smartcard
- gpg2 --list-secret-keys lists the (absent) private key on the smartcard
- gpg2 --delete-secret-keys NAME refuses to unregister the private key
Impact: if you receive a file that is encrypted both for you and the smartcard owner, there is a chance that gpg2 will try to decrypt the file with the wrong private key. Because you don't have that key, you can't decrypt the file.
Workaround: list the keygrips with --list-keys --with-keygrip and delete the corresponding files in private-keys-v1.d/