Skip to content

How to Delete a Let’s Encrypt Certificate using Certbot

Advertisement

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

I, Rahul Kumar am the founder and chief editor of TecAdmin.net. I am a Red Hat Certified Engineer (RHCE) and working as an IT professional since 2009..

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