I have a script that loads a user's identity into keychain. The script deletes old or duplicate certificates and imports new identities without issue. But the private keys are left behind from previous identities. I re-read "man security" but I can't seem to find a solution. Removing the users keychain in this case is not an option. Any advise?
I realize there is an similar question here: Remove private key from Mac OS X keychain using Terminal but the answer of "delete the Keychain" isn't possible in my case. I posted a question to that thread, but it was deleted by a moderator of some reason. So I'm opening a new question here.
Thank you!