Certbot list contains inactive sites - how to trim?

I'm using the certbot command line tool to renew all the site certificates on my server. However, when I run the command sudo certbot, the list of sites presented to me shows old sites that are no longer active.

How do I trim this list to only include active sites? I've looked in /etc/letsencrypt/renewal and also my /etc/nginx/sites-available directories, but this list contains sites that are no longer in either of those.

I have attached a screenshot of the list in question.

But your screenshot is fromsudo certbot, which is not the same as sudo certbot renew. Your current screenshot lists all the hostnames available to nginx and is not related to the certificates available to Certbot.

You can use sudo certbot certificates to show the certs known to Certbot. Please see the Managing certificates section of the Certbot user guide to manage and/or delete existing certificates.

5 Likes

Hi @chrisjimallen, and welcome to the LE community forum :slight_smile:

I'm confused by your "inactive sites" statement.
That list should contain only active nginx sites.
Try comparing that list with the output of:
sudo nginx -T | grep -i server_name

3 Likes

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