Skip to content

How to Delete a Let’s Encrypt Certificate using Certbot

Category
Security
Covers
Let's Encrypt, SSL/TLS
On this page

Certbot is a free tool that helps manage Let’s Encrypt certificates. With Certbot, you can create certificates with one simple command and set up web servers easily.

By default, Certbot saves all certificates in the directories listed below. We don’t recommend deleting files manually. In this guide, we will show you how to delete old SSL certificates using Certbot’s command line.

  • /etc/letsencrypt/live
  • /etc/letsencrypt/renewal
  • /etc/letsencrypt/archive

How to Delete a Let’s Encrypt SSL Certificate

Certbot lets you delete certificates automatically. To remove a certificate, use this command:

sudo certbot delete

This command will show a list of domain names. Choose the number of the domain you want to delete and press enter. The certificate and related files will be removed.

Deleting Let's Encrypt Certificate using Certbot
Deleting Let’s Encrypt certificate using certbot

If the domain name you want to delete is not listed, you can use this command:

sudo certbot delete --cert-name example.com

That’s all!

Conclusion

This guide explained how to delete a Let’s Encrypt SSL certificate using the Certbot command-line tool. Certbot makes it easy to manage SSL certificates with simple commands, allowing users to delete unneeded certificates quickly and safely.

Rahul

Rahul Kumar is the founder and chief editor of TecAdmin.net. A Red Hat Certified Engineer (RHCE), he has worked in IT since 2009, with hands-on experience in Linux system administration, DevOps, web hosting, cloud platforms and automation. He started TecAdmin in 2013 to share practical, step-by-step guides, and leads its editorial work with one aim: making technical learning clear and useful for sysadmins, developers and beginners alike.

4 Comments

  1. Hump! I want to use a script that runs autonamously to delete old certificate files and leave the current/latest. Not via an interactive (user required) interface

Leave a Reply

Your email address will not be published. Required fields are marked *


Back to top