Previous Article

Letsencrypt Certbot correctly delete certificate

Next Article

LetsEncrypt certbot utility is a handy tool for generating SSL certificates on development, staging and production environments.

You could wait for the certificate to expire and then manually remove all files associated with it in the various directories, but the Certbot tool has it's own command available to cleanup everything associated with a certificate.

Delete LetsEncrypt Certbot Certificate

$ sudo certbot delete

You will be shown an index list of certificate names and be asked to choose the one you want to delete. Pressing enter confirms the selection and the certificate will be removed from the system as well as any configuration files stored in relation to it.

Delete LetsEncrypt Certbot Specific Domain

If you already know the certificate name you want to delete you can pass an argument to target the specific certificate.

$ sudo certbot delete --cert-name example.com

This removes the targeted certificate without the index list appearing. This can be useful if the certificate doesn't appear in the index list or if you want to run a scripted un-installation for your DevOps be it in Ansible, or your tool of choice.

Avatar of Clive Walkden

Clive Walkden

Posted:

Latest Articles

Linux command line tools, installations etc

Linux

How to Install NordLayer VPN Client on Ubuntu 20.04 and Connect to a Virtual Network

A simple to follow installation guide for NordLayer VPN

MySQL usage, tweaks and learnings

MySQL

Mastering MySQL Database Imports on Linux

Learn efficient ways to import MySQL databases on Linux using the mysql command-line client. Explore the --source option and < operator for seamless data migration. Master MySQL imports on Linux with our comprehensive guide.

DevOps principles and tool usage

DevOps

Mastering SSH Key Conversions for DevOps

A guide to convert SSH keys from one version to another using Linux CLI