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"