Ubuntu – How to completely remove “certbot” from ubuntu

letsencrypt

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.

Best Answer

Do a search with:

sudo dpkg -l *certbot*

-l *certbot* does a regex search, so packages with names that include "certbot" will be returned in the search results.

dpkg-query -l *certbot*

will also do the same. From man dpkg:

dpkg-query actions
       See dpkg-query(1) for more information about the following actions.

       -l, --list package-name-pattern...
           List packages matching given pattern.

Also see info dpkg!