How to remove Let’s Encrypt SSL (certificate) on Ubuntu

When you install the OpenLiteSpeed ​​web server and create a website using the CyberPanel management panel, a certificate is automatically generated. However, if the certificate (Let’s Encrypt SSL) is not applied properly or an error occurs, you can solve the problem by deleting the certificate and reinstalling it.

For those of you looking for a way to delete a certificate, you can easily remove a Let’s Encrypt certificate by following the instructions below in order, based on the Ubuntu operating system and the OpenLiteSpeed ​​web server.

Before proceeding with any task, you must first perform a backup.

Let’s Encrypt SSL

Encrypt SSL

Let’s Encrypt SSL is a free and easy way to strengthen the security of your website. This service provides automated certificate issuance and management functions, allowing users to easily install without going through complicated procedures.

CyberPanel management panel makes it easy to apply with just one click. However, as you create and delete multiple websites, you may end up with unnecessary SSL certificates.

In this case, you can connect via SSH, check the path, and then delete unused certificates.

Remove certificate

Encrypt SSL

After connecting to your Lightsail instance, click ‘Connect using SSH’ in the Connection tab.

cd /etc/letsencrypt/live/

This is a command to navigate to the directory where the Let’s Encrypt certificate is stored. It is usually located at /etc/letsencrypt/live/ .

sudo find / -name "*.pem"

If you can’t find the exact path, you can check the path by entering the command above.

ls -l

Once you’ve navigated to the saved directory, you can use the command above to see a list of currently installed certificates.

sudo rm -rf /etc/letsencrypt/live/domain_name
sudo rm -rf /etc/letsencrypt/archive/domain_name
sudo rm -rf /etc/letsencrypt/renewal/domain_name.conf

After checking the list of certificates, you can remove any certificates you don’t need by entering the command above. At this time, change the ‘domain_name’ part to the domain name you want to delete.

The thing to be careful about here is to make sure you don’t enter a domain that is currently in use and then remove it.

sudo certbot renew

If you have removed unnecessary domain certificates, you can renew them by entering the command above.

sudo systemctl restart lsws

Finally, you can restart the server. The removal process is not difficult if you know the path and command, but since it performs an important function, be sure to back it up and proceed with caution.

▶ How to install dual WordPress on CyberPanel

▶ How to completely remove Varnish Cache from Ubuntu

▶ How to fix HTTPS redirect not working in OpenLiteSpeed

Leave a Comment

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