Skip to content

Instantly share code, notes, and snippets.

@x3rAx
Last active June 23, 2018 13:06
Show Gist options
  • Save x3rAx/fcdb08a2134b2c03a373ff4ad9b190d5 to your computer and use it in GitHub Desktop.
Save x3rAx/fcdb08a2134b2c03a373ff4ad9b190d5 to your computer and use it in GitHub Desktop.
[letsencrypt] Certbot - Remove Domain

DISCLAIMER: This method worked for me. I am not responsible for any damage caused if you follow these instructions! Read the documentation, learn what the commands do and then decide when or if you want to use it.

To remove a domain from a letsencrypt certificate when renewing, use the following command:

# certbot renew --allow-subset-of-names --dry-run

Remove the --dry-run if you are certain that this command does what you want.

And don't forget to reload your nginx/webserver/whatever.

A word of warning: The above command will remove a domain from the certificate if the challenge fails for whatever reason. Do not blindly use it! When using this command, read the output of certbot and make sure that only the domains get removed that you want to be removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment