Install Config Wiki

All about installing, configuring and troubleshooting

User Tools

Site Tools


remove_letsencrypt_certbot_re_install

This is an old revision of the document!


Remove LetsEncrypt Certbot in Order to Properly Re-Install Certbot

$ certbot --version
certbot 1.21.0
user@svr1:~$ sudo certbot --apache
Saving debug log to /var/log/letsencrypt/letsencrypt.log
The requested apache plugin does not appear to be installed
user@svr1:~$ sudo certbot delete
Saving debug log to /var/log/letsencrypt/letsencrypt.log
No existing certificates found.
Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /var/log/letsencrypt/letsencrypt.log or re-run Certbot with -v for more details.
user@svr1:~$ sudo apt purge python-certbot-apache
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package python-certbot-apache
user@svr1:~$ sudo a2dissite 000-default-le-ssl.conf
ERROR: Site 000-default-le-ssl does not exist!
user@svr1:~$ sudo apt update
Hit:1 http://us.archive.ubuntu.com/ubuntu jammy InRelease
Get:2 http://us.archive.ubuntu.com/ubuntu jammy-updates InRelease [119 kB]
Get:3 http://us.archive.ubuntu.com/ubuntu jammy-backports InRelease [108 kB]
Get:4 http://us.archive.ubuntu.com/ubuntu jammy-security InRelease [110 kB]
Get:5 http://us.archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages [724 kB]
Get:6 http://us.archive.ubuntu.com/ubuntu jammy-updates/restricted amd64 Packages [418 kB]
Get:7 http://us.archive.ubuntu.com/ubuntu jammy-updates/universe amd64 Packages [932 kB]
Fetched 2,410 kB in 1s (1,689 kB/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
All packages are up to date.

Next

user@svr1:~$ sudo apt remove certbot

Results

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
  python3-acme python3-certbot python3-configargparse python3-icu python3-josepy
  python3-parsedatetime python3-requests-toolbelt python3-rfc3339 python3-zope.component
  python3-zope.event python3-zope.hookable
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
  certbot
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 63.5 kB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 83386 files and directories currently installed.)
Removing certbot (1.21.0-1build1) ...
Processing triggers for man-db (2.10.2-1) ...

Next

user@svr1:~$ sudo apt autoremove

Results

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages will be REMOVED:
  python3-acme python3-certbot python3-configargparse python3-icu python3-josepy
  python3-parsedatetime python3-requests-toolbelt python3-rfc3339 python3-zope.component
  python3-zope.event python3-zope.hookable
0 upgraded, 0 newly installed, 11 to remove and 0 not upgraded.
After this operation, 4,852 kB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 83375 files and directories currently installed.)
Removing python3-certbot (1.21.0-1build1) ...
Removing python3-acme (1.21.0-1ubuntu0.1) ...
Removing python3-configargparse (1.5.3-1) ...
Removing python3-icu (2.8.1-0ubuntu2) ...
Removing python3-josepy (1.10.0-1) ...
Removing python3-parsedatetime (2.6-2) ...
Removing python3-requests-toolbelt (0.9.1-1) ...
Removing python3-rfc3339 (1.1-3) ...
Removing python3-zope.component (4.3.0-3) ...
Removing python3-zope.event (4.4-3) ...
Removing python3-zope.hookable (5.1.0-1build1) ...

Next

user@svr1:~$ sudo systemctl restart apache2

user@svr1:~$ sudo systemctl status apache2

Results

● apache2.service - The Apache HTTP Server
     Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
     Active: active (running) since Thu 2023-06-22 14:43:31 UTC; 9s ago
       Docs: https://httpd.apache.org/docs/2.4/
    Process: 9988 ExecStart=/usr/sbin/apachectl start (code=exited, status=0/SUCCESS)
   Main PID: 9992 (apache2)
      Tasks: 6 (limit: 19013)
     Memory: 14.8M
        CPU: 55ms
     CGroup: /system.slice/apache2.service
             ├─9992 /usr/sbin/apache2 -k start
             ├─9993 /usr/sbin/apache2 -k start
             ├─9994 /usr/sbin/apache2 -k start
             ├─9995 /usr/sbin/apache2 -k start
             ├─9996 /usr/sbin/apache2 -k start
             └─9997 /usr/sbin/apache2 -k start

Jun 22 14:43:31 svr1 systemd[1]: Starting The Apache HTTP Server...
Jun 22 14:43:31 svr1 apachectl[9991]: AH00558: apache2: Could not reliably determine the server's full>Jun 22 14:43:31 svr1 systemd[1]: Started The Apache HTTP Server.
remove_letsencrypt_certbot_re_install.1687448560.txt.gz · Last modified: 2023/06/22 15:42 by wikiadmin