How to Delete Let’s Encrypt SSL Certificates
Deleting Let’s Encrypt SSL certificates (digital security files that secure websites) involves revoking the credentials first and then running Certbot (the official tool for managing these files) to remove them from your server. Certbot stores these files in the /etc/letsencrypt/live folder, and you need to delete them when a certificate expires or gets compromised.
Revoke the certificate first so the security authority knows to shut it down. Once you finish that, a command removes the files for good.
Use the command line tool Certbot to delete Let’s Encrypt SSL certificates. Open your terminal and run `sudo certbot delete –cert-name yourdomain.com`, replacing `yourdomain.com` with your actual domain. If you omit the domain name, Certbot will list all registered domains for you to select from.
How to delete Let’s Encrypt SSL certificates on Ubuntu Linux
You can delete Let’s Encrypt certificates on Ubuntu Linux by running a single command in your terminal. Connect to your server and type sudo certbot delete –cert-name example.com, replacing example.com with your actual domain name. This removes the certificate files and configuration from your system completely.
Here is the procedure.
Sign in to the server and open the terminal. Run the command below, making sure to replace example.com with the actual domain name.
sudo certbot delete --cert-name example.com
Running the command without referencing a domain name lists all domains registered on the server.
sudo certbot delete
Select the target domain from the resulting list for deletion.
Saving debug log to /var/log/letsencrypt/letsencrypt.log Which certificate(s) would you like to delete? - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1: example.com 2: example1.net 3: example2.org - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Select the appropriate numbers separated by commas and/or spaces, or leave input blank to select all options shown (Enter 'c' to cancel): 1
Match the target domain to its assigned number, input that number, and press ENTER.
That completes the process.
Related post:
Conclusion:
- Deleting Let's Encrypt SSL certificates using Certbot is essential for maintaining a secure and organized server environment.
- After revoking a certificate, remnants of the certificate may still exist on the server, which can be eliminated by using Certbot to delete them.
- Following the step-by-step process described in this post ensures that unnecessary certificates are removed, optimizing the server's security and efficiency.
Was this guide helpful?
About the Author
Richard
Tech Writer, IT Professional
Richard, a writer for Geek Rewind, is a tech enthusiast who loves breaking down complex IT topics into simple, easy-to-understand ideas. With years of hands-on experience in system administration and enterprise IT operations, he’s developed a knack for offering practical tips and solutions. Richard aims to make technology more accessible and actionable. He's deeply committed to the Geek Rewind community, always ready to answer questions and engage in discussions.
No comments yet — be the first to share your thoughts!