How to Delete Let’s Encrypt SSL Certificates
Deleting Let’s Encrypt SSL certificates (digital security files for websites) involves running a few quick commands with Certbot, the official tool used to manage these free credentials. Certbot stores these files inside the /etc/letsencrypt/live folder on your server, and you might need to delete them if a certificate expires or gets compromised.
Revoking the certificate first is always a smart step so the security authority knows to shut it down. Once you finish that, a simple 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
Cleaning out old certificate files on Ubuntu Linux helps keep the server tidy. Accessing the server’s command line allows running specific commands for the domain requiring management.
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!