Skip to content

Instantly share code, notes, and snippets.

@damkh
damkh / removeExpiredCerts.sh
Last active February 26, 2024 15:17 — forked from grommitz/removeExpiredCerts.sh
Remove expired certificates from a keystore
#!/bin/bash
# remove expired certs from a keystore
# set FN to the keystore file
FN=cacerts.jks
echo "finding expired certs..."
ALIASES=`keytool -list -v -keystore $FN -storepass changeit | grep -i 'alias\|until' `