Certbot - Subdomain Removed From Web Server but Certificate Not Removed From Certbot Management

The problem is as follows. I had have a couple of domains on a server which point to different web roots. I removed a sub domain from the server but certbot keeps trying to renew it. It has now also interfered with the renewal of other domains where the auto renew process just fails.

I ran this command:
/opt/certbot-auto renew

It produced this output:
Attempting to renew cert from /etc/letsencrypt/renewal/sub.xxx.com-0001.conf produced an unexpected error: Missing command line flag or config entry for this setting:
Select the webroot for chat.xxx.com:
Choices: [‘Enter a new webroot’, ‘/var/www/subxxxdomainroot’]

(You can set this with the --webroot-path flag). Skipping.

The chat.xxx.com doesn’t appear anywhere in any config file that I can find.

My web server is (include version):
nginx version: nginx/1.10.0 (Ubuntu)

The operating system my web server runs on is (include version):
ubuntu 16.04.1

My hosting provider, if applicable, is:
AWS

I can login to a root shell on my machine (yes or no, or I don’t know):
Yes

I’m using a control panel to manage my site (no, or provide the name and version of the control panel):
No

hi @kyluke

Review the syntax for removing a certificate for a given domain

Certbot has it’s own way of keeping track of domains and the fact you have removed a server block from your web server is not picked up.

List Known Certificates

Certbot certificates

Delete Certificate

Certbot --delete (name of certificate as above)

Andrei

Thanks Andrei, that is exactly what I am looking for.

I ran ./certbot-auto --delete sub.domain.com but get the following error:
certbot: error: unrecognized arguments: --delete

I’m running certbot version 0.14.2

hi @kyluke

apologies the command is

certbot delete

Andrei

Thanks Andrei. I had to solve it by deleting and re-creating the cert. I also had to manually remove the cert configs in /etc/letsencrypt if anybody is interested.

Thanks for your help.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.