Automatically delete all unused certbot certificates

Viewed 300

I'm aware certbot certificates gives me a complete list of all available certificates.

I'm also aware certbot delete does the same, and then gives me the ability to remove one.

However, considering certbot integrates itself with nginx and apache, is there a way to ask it to delete all certificates which are currently not being used by nginx?

The alternative would be opening all configurations in /etc/nginx/site-enabled, write down all certificates being used, run certbot certificates, write down all unused certificates and find them one by one in the certbot delete list.

0 Answers
Related