How do I remove a custom LetsEncrypt Installation


Running nginx, I followed this guide to install letsencrypt:

I mistakenly skipped the intro (my bad :() and thought this was the best practice installation.

Only afterwards did I find out that certbot is preferred.

I know find myself with an nginx server, not automatically configured for letsencrypt.

My issue is that, as a complete and utter newcomer to system administration and VPS, I'd rather just remove letsencrypt and re-install via certbot than manually configure nginx to work via HTTPS and HTTPS only and everything else.

I already removed the auto-maintain and auto-renewal; deleted the cron jobs.

I'd really appreciate it if someone can help me to completely uninstall and clean up this letsencrypt installation so I can later redo it via certbot.

Thanks so much!

1 Reply

Linode Staff

This should be pretty easy since the method used in this guide doesn't really install anything other than Git. It just downloads the letsencrypt repository into a directory.

If you're sure that you don't need Git anymore, you can remove it completely:

On Debian (and derivatives):

$ sudo apt-get purge git

Or, on CentOS:

$ sudo yum remove git

Next, you can completely remove the /opt/letsencrypt directory (the directory that you downloaded the LetsEncrypt repository to).

$ sudo rm -rf /opt/letsencrypt

If you actually generated a Certificate using the instructions in the guide, then you'll also want to remove this following directory:
(If you already installed Certbot, this will also remove any certificates generated by that tool, and it could possibly break your Nginx/Apache configurations)

$ rm -rf /etc/letsencrypt

(I know you've already done this, but just for the sake of it…)
If you added the Cron entry to your cron table, then you'll also need to remove that line. You can open the cron table with this command:

$ sudo crontab -e

Then, you'll just want to remove the following line:

0 0 1 * * /opt/letsencrypt/letsencrypt-auto renew

That should do it.


Please enter an answer

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct