I have imported multiple certificates(with alias name) into pc.keystore
. I want to delete 2 aliases (mydomain and ourdomain) entries from the keystore.
I know we can delete one entry from keystore using alias like:
keytool -delete -alias mydomain -keystore pc.keystore
But i want to delete two aliases (mydomain and ourdomain) entries from pc.keystore
. Is there any option to achieve this ?
Thanks in advance.
Use case to delete an alias from a keystore. In the case of a trust store on occasion, an external trusted system will change root certificates in which case you should either update your alias with the new trusted root, or delete the alias and create a new entry with a new alias.
Check the contents of the trust store by entering the following in the command prompt: <JAVA_HOME>\bin\keytool -list -v -keystore truststore -storepass access . Note the alias names of the certificates you want to remove. Enter <JAVA_HOME>\bin\keytool -delete -alias <alias name> -keystore truststore.
And the only way you can sign with a different alias would be to clone the previous one as the answer also suggests.
Is there a reason you can't do this?
keytool -delete -alias mydomain -keystore pc.keystore
keytool -delete -alias ourdomain -keystore pc.keystore
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With