Install

sudo apt update
sudo apt install snapd
sudo snap install core
sudo snap refresh core
sudo snap install --classic certbot
sudo ln -s /snap/bin/certbot /usr/bin/certbot

Create a certificate for Apache

sudo certbot --apache

Create a certificate for Nginx

sudo certbot --nginx

Renew

sudo certbot renew

Revoke

sudo certbot revoke --cert-path /etc/letsencrypt/live/www.example.com/fullchain.pem