FreeKB - Java Keystore keytool delete command (Delete a certificate)
Java Keystore - keytool delete command (Delete a certificate)

If you are not familiar with the Java keytool command, check out our Getting Started article.

Before deleting a certificate into a keystore file, you will want to determine the keystore type, which is typically JKS or PKCS12. The Java keytool command with the -list option can be used to determine the keystore type.

keytool -list -keystore "/path/to/keystore"

 

Which should return something like this. In this example, the keystore type is PKCS12.

Keystore type: PKCS12

 

The -delete flag can be used to delete a certificate from a keystore. Notice in this example that the -storetype is PKCS12.

keytool -delete -keystore "/path/to/keystore" -alias alias_name -storetype pkcs12 -storepass "keystore_password"

 



Add a Comment




We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.




Please enter aa1f9 in the box below so that we can be sure you are a human.




Comments

Web design by yours truely - me, myself, and I   |   jeremy.canfield@freekb.net   |