How to know which version of Certbot is installed?

I use a Ubuntu 16.04 with Nginx and Certbot.

I tried to execute, for example:

certbot -v
certbot -V
certbot --version
man certbot

none gave any relevant output. How could I know the version currently installed in my Ubuntu?


Solution 1:

14.04 and 16.04 systems (and NOT using the PPA):

Ubuntu Trusty and Ubuntu Xenial both do not have certbot installed by default. To get Certbot, you had to be using the Certbot PPA maintained by the Certbot developers.

If you are not using the PPA (which you would have installed using sudo add-apt-repository ppa:certbot/certbot), you don't have Certbot.

To get Certbot, you should read through the instructions on the Certbot Website by choosing your specific release, and then follow the guide to set up Let's Encrypt.


14.04/16.04 systems using the PPA, or Ubuntu 17.10 or later:

At the time of this post, Ubuntu releases 16.10 and 17.04 are past End of Life and not included for this answer.

As of 17.10 (and potentially earlier, see my note above), Certbot is included in the repositories.

And if you are on older Ubuntu (14.04 or 16.04), and you are using the PPA, then certbot is available.

To find the version of Certbot installed, you can use apt-cache policy certbot | grep Installed to get the information, as shown below (note that the version information shown below is accurate as of April 10, 2018 at 12:18, on a brand new 'certbot' installation):

$ apt-cache policy certbot | grep -i Installed
  Installed: 0.22.2-1+ubuntu16.04.1+certbot+1

As you can see, version 0.22.2 is installed on this computer here, which is a 16.04 machine using the Certbot PPA.

Solution 2:

If you did not get the certbot with apt like @Thomas Ward said, you will get it with the wget command as a stand-alone application instead.

Try this command below:

sudo /PATH/TO/certbot-auto --version