I understand that I can revoke a certificate or I can wait for its expiration. But it does not remove related files from /etc/letsencrypt.
What if I have an issued certificate(s) for a domain and I know that I don’t need it anymore - what is the correct way to completely remove it? I would like to keep /etc/letsencrypt clean as much as possible.
My first idea was:
revoke it
delete related files from /etc/letsencrypt
But it looks to me that the design is that I should not manually edit/remove files in /etc/letsencrypt.
What do you suggest? Or am I supposed to keep files in /etc/letsencrypt forever?
I’m honestly not sure about the files but why revoke it? Revocation implies you’ve lost control of your private key(s). You could just allow it to expire.
Yes, a feature / verb to completely remove a domain from configuration is necessary.
Or, at least, a documentation how to do it manually in correct order.
The reason for deleting cert:
For example, I began developing new version of site at new.site.com
Then I need to issue cert for new.site.com
Then, when development is ending, I switch domain site.com to the directory of test.site.com
And I need to expand certificate new.site.com to site.com.
This is confused me that I have got root cert with the test name.
May be the best way to do that is to define filename for new.site.com’s certificate in command line, and set it to site.com
I like the idea that we keep records of the certs we have generated - however I too have old certs I no longer wish to renew. I found that creating a new directory /etc/letsencrypt/renew_disabled and simply moving a domains’s renewal file from /etc/letsencrypt/renew into the new folder was enough for the certbot renew command not to action these domains.
Not sure if there’s an officially supported way of doing this, but I wanted to add that in additional to the /live and /renewal directories, there’s also a copy of the cert in /archive.
“certbot delete” is a good starting point, but it doesn’t remove the created apache vhost and settings.
So executing “service apache2 restart” will trigger a “AH00526: Syntax error”
It would be great also if we could just do certbot delete {$DOMAIN} – having to select from a numbered list and then input the number is a little clunky.
Rename has not yet launched, because we stalled on the complexity of renaming certs within the configuration files. Currently I would recommend deleting and recreating the certs with a new name.