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.
Best Answer
Is there a reason you can't do this?
keytool -delete -alias mydomain -keystore pc.keystorekeytool -delete -alias ourdomain -keystore pc.keystore
It can be done in one command as well:
keytool -delete -alias mydomain -alias ourdomain -keystore pc.keystore
keytool -delete -alias name_of_certificate -keystore "C:\Program Files\Java\jdk1.8.0_192\jre\lib\security\cacerts" -storepass changeit
name_of_certificate
is the alias name that you want to delete from yout keystore
after -keystore
the path is path to your jks/keystore
place