How to totally remove a certbot-created SSL certificate?

Solution 1:

Yes, certbot can help you clean up.

sudo certbot certificates

will list what certbot thinks you have installed

sudo certbot delete

will allow you to interactively remove and clean up unwanted / deprecated domains.

Solution 2:

If you are running apache2 you will also want to remove the certbot references from the conf file otherwise certbot will get confused when you add a new certificate.

sudo certbot delete

then

emacs /etc/apache2/sites-enabled/000-default-le-ssl.conf 

Remove these lines

Include /etc/letsencrypt/options-ssl-apache.conf 
ServerName example.com 
SSLCertificateFile /etc/letsencrypt/live/example.com/fullchain.pem 
SSLCertificateKeyFile /etc/letsencrypt/live/example.com/privkey.pem

Solution 3:

Get the certificate's name that will delete

sudo certbot certificates

Delete only one certificate by the name

sudo certbot delete --cert-name server.domain.tld