[OPTIONAL] list the keygrip IDs using
gpg --list-secret-keys --with-keygrip
If ALL your private keys are on external cards like the Yubikey, you can delete them all using:
rm -r ~/.gnupg/private-keys-v1.d
After the deletion of the keygrips, it seems beneficial to run
gpgconf --kill gpg-agent
gpg --card-status