-
Notifications
You must be signed in to change notification settings - Fork 58
/
certbot-removal
32 lines (24 loc) · 1.04 KB
/
certbot-removal
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
Below steps worked for me when I needed the same solution.
Remove Certbot
sudo certbot delete
Remove Certbot's Apache package
sudo apt purge python-certbot-apache
Disable the SSL config file created by certbot
sudo a2dissite 000-default-le-ssl.conf
Remove certbot files manually
sudo rm -rf /etc/letsencrypt/
sudo rm -rf /var/lib/letsencrypt/
sudo rm -rf /var/log/letsencrypt/
Make sure the repo is updated and autoremoved
sudo apt update
sudo apt upgrade
sudo apt autoremove
Cautious: Additionally you can also reinstall apache2 if needed for fresh config files
sudo apt purge apache2
sudo service apache2 restart
If mods-available folder also completely get purged during apache2 removal process then PHP will not be executed and code will be displayed on the browser. In my case, PHP version is 7.2 and executed the below. Adjust the below commands based on your PHP version.
sudo apt purge libapache2-mod-php7.2
sudo apt install libapache2-mod-php7.2
sudo a2enmod php7.2
sudo apachectl configtest
sudo service apache2 restart