Remove unused domain from a cert(contains 40+ domains)

I have a cert that installed months ago, inside contains over 40 domains. The cert has expired and when i try to renew the cert with
sudo certbot renew --dry-run

I received error
1 renew failure(s), 0 parse failure(s)

It shows the expired domain( that I no longer using…

Under live folder, i have 1 cert (

I have tried this commmand but it’s not working

certbot delete --cert-name 

I received this error

No certificate found with name (expected /etc/letsencrypt/renewal/

My question is how to remove it from this cert so that i can renew my cert with the correct command? Thank you

1 Like

The way to do this is a bit cumbersome: You have to run a command similar to the one you used to create the certificate.

For example, if you used:

sudo certbot --apache -d -d -d -d

And you want to remove both names, you would have to use something like:

sudo certbot --apache --cert-name -d -d

In other words, you have to run almost the same command you used originally, with the complete list of 39+ names you want in the new certificate, and the --cert-name option added.

The --cert-name argument is the certificate name used by Certbot. It’s used as the name of the /etc/letsencrypt/live/ subdirectory and can also displayed by sudo certbot certificates. In your case, it seems to be

If you need help, please post the actual, unedited output of sudo certbot certificates.


thx for your info. Other than this traditional method, is there a easier method?

1 Like

There is an easier but riskier method: you can renew with --allow-subset-of-names.

This will remove all names for which renewal attempts fail. However, it will remove names regardless of whether the renewal attempt failed for an expected or an unexpected reason.


hello schoen, thx for your reply. Assume it removed a domain that i want to remain, can i add it back manually ? Pleaes advice

1 Like

If you use --allow-subset-of-names, Certbot will issue and save a certificate, unless every name fails.

You could then issue another new certificate adding more names the same way you always do – running a Certbot command and selecting every name you want it to include.

1 Like

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