How to stop renewing a letsencrypt/certbot certificate?

Jackson picture Jackson · Oct 13, 2016 · Viewed 13.9k times · Source

There are lots of tutorials online of how to create and renew a certificate with letsencrypt, but I want to remove and stop renewing a certificate that I created (it was only created for testing purposes). How do I stop renewing one certificate originally obtained with the letsencrypt command (while still continuing to renew other certificates)?

I don't see a single instance of anyone asking this question anywhere else, nor a command in man letsencrypt that seems to do it.

Currently I am renewing certificates with the following cron job:

30 2 * * 1 /usr/bin/letsencrypt renew >> /var/log/le-renew.log
35 2 * * 1 /bin/systemctl reload nginx

Answer

minimalis picture minimalis · Nov 19, 2017

With certbot, you can simply use:

certbot delete --cert-name mywebsite.com

This removes the certificate and all relevant files from your letsencrypt config directory.