You might have tried to just delete the certificate files or some config files manually, and got into errors?

Using Certbot to do the task

Certbot includes a command, namely “delete” to remove a domain configuration and certificate files for you, in the correct manner.

sudo certbot delete

By typing sudo certbot delete, you will get a list of configured domains with a number preceding it. Just enter the number of the domain you want to delete from Certbot, and it will do that for you!

If you already know exactly what you want to delete, without getting a list output, just use the more direct command of:

sudo certbot delete --cert-name

You will have to replace with the actual domain to remove from Certbot, duh.

This means you will either have to do one of the following:

  • Add the domain to Certbot again
  • move to another application to issue Let’s Encrypt certificates
  • move to another CA (Certificate Authority)
  • downgrade to HTTP (bad idea)

Please note that your Apache HTTP Server config will have to be adapted manually.

That’s all there is to it!