I've tried
sudo apt-get remove python-certbot-apache
sudo apt-get purge --auto-remove python-certbot-apache
sudo apt-get remove python3-certbot-apache
sudo apt-get purge --auto-remove python3-certbot-apache
but when I run command certbot
it still is recognized. How can I completely remove it, thus, typing that command was like any unrecoginzed command.
Below steps worked for me when I needed the same solution.
Remove Certbot
Remove Certbot's Apache package
Disable the SSL config file created by certbot
Remove certbot files manually
Make sure the repo is updated and autoremoved
Cautious: Additionally you can also reinstall apache2 if needed for fresh config files
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.Hope this helps someone.
If you have installed
certbot
usingsnap
, this will work perfectly:Do a search with:
-l *certbot*
does a regex search, so packages with names that include "certbot" will be returned in the search results.will also do the same. From
man dpkg
:Also see
info dpkg
!I tried to use
sudo apt install certbot
on my Ubuntu. And it turns out the version0.40.0
is far behind the current version1.16
.So I followed 5th step of the official instructions here.
Run
sudo apt-get remove certbot
andsudo apt autoremove
. It works for me.