Remove nginx conf rules automatically added by certbot


Whenever I create a certificate using the following command:

./certbot-auto --debug --nginx -d -d

The certbot automatically configures my nginx conf files found at /etc/nginx/sites-available/*.conf.
However, when I delete the certificate or revoke it, the certbot does NOT clean its automated additions.

How to tell the Certbot to clean the conf file on deleting the certificate?


Hi @NizarBlond,

This option does not exist in this form. However, there is a revert command that should restore your previous nginx configuration, which Certbot backs up before modifying it. In this case, it simply restores the pre-modification backup copy of the configuration, which means any other changes that you’ve made to the nginx configuration in the meantime will also be overwritten.

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