I have two certbots installed on a Ubuntu 16.06 VPS, running nginx. They are:
/usr/bin/certbot --version
certbot 0.21.1
/usr/local/bin/certbot --version
certbot 0.14.2
Which one is correct, and how do I uninstall the other??
Much thanks.
I have two certbots installed on a Ubuntu 16.06 VPS, running nginx. They are:
/usr/bin/certbot --version
certbot 0.21.1
/usr/local/bin/certbot --version
certbot 0.14.2
Which one is correct, and how do I uninstall the other??
Much thanks.
the output from command
"which certbot
"
should tell you
Rip
âwhich certbotâ give me /usr/local/bin/certbot. but the version is older than /usr/bin/certbot. Any idea how to properly uninstall one or the other? I sadly donât recall whether it was apt-get, or a github pull, etc., and I am afraid that uninstalling the wrong one will affect the correct one.
Hi @scooke!
Try command : " sudo apt-get up certbot " no quotes
Should work for you I think.
Rip
Is that update, or upgrade? On my Ubuntu 16.04 VPS " sudo apt-get up certbot " gives me E: Invalid operation up
sudo apt-get up certbot OR sudo apt-get update certbot will achieve the same results.
use update or up ⌠up is alias or shorthand for update, so to speak.
/usr/local/bin/certbot
is the result of installing Certbot from pip (pip install certbot
).
/usr/bin/certbot
comes from python-certbot
from the Ubuntu Certbot PPA.
You probably want the latter.
You could try uninstalling certbot from pip and seeing if that helps.
Running sudo apt-get update certbot
gives me 'E: The update command takes no arguments'. So I just ran sudo apt-get update
, then sudo apt-get upgrade certbot
, and it did indeed upgrade /usr/bin/certbot, but I still have /usr/local/bin/certbot version 0.14.2 hanging around in /usr/local/bin/.
Thanks for hte reply. I strangely get an error â-bash: pip: command not foundâ. But I must have (had) it since it was used to install the /usr/local/bin version. Not sure what to do.
If the following query comes up empty, I would just delete the file and get on with your life:
dpkg -S /usr/local/bin/certbot
this is just not my day. This is what returns, 'dpkg-query: no path found matching pattern /usr/local/bin/certbot'. I suppose I could just sudo rm /usr/local/bin/certbot
?
Your ârogue certbotâ wont hurt anything for now⌠One of the forums experts might help you figure out which package management app installed the other certbot, although thatâs a bit out of scopeâŚ
Can you give us some information about your configuration so we can help?
Operating System?
Web Server?
Virtual Hosts?
This info makes a huge difference in the way you would invoke certbot commands.
Thanks
Rip
Ok, thank you for the help.
At the moment it is the rogue certbot which is the one used when I run sudo certbot --nginx -d domain.com
. But it fails. But when I run sudo /usr/bin/certbot --nginx -d domain.com
then it works fine. My question is how can I permanently change to the /usr/bin/certbot rather than /usr/local/bin/certbot? I think if I just rm /usr/local/bin/certbot
then running sudo certbot --nginx -d domain.com
wont run at all since it wonât find the currently reference certbot.
Whenever youâre worried deleting something might be bad, you should always make sure you have a backup. The mv
command performs a great backup of first or last resort.
The certbot
file is just a tiny script that points to a larger set of libraries. But if you arenât worried about the wasted disk that might leave than removing/moving the not-working certbot command should be totally fine.
Depends â if the rogue Certbot installed a ton of Python modules in /usr/local/lib
, that could cause problems now or in the future.
If itâs a copy of certbot-auto, it installed everything in a separate location, so it may be a waste of disk space but it wonât cause any (other) harm.
To be sure about that, we should see what Python installation these certbot
s use:
head -n2 /usr/{local/,}bin/certbot
Iâm pretty sure if there was a sys.path
conflict python-certbot
0.22 wouldnât work due to python-acme
0.14 missing ACMEv2 classes though.
Running that gave me:
==> /usr/local/bin/certbot <==
#!/usr/bin/python
==> /usr/bin/certbot <==
#!/usr/bin/python3
I just went ahead a ran mv
and moved the certbot from /usr/local/bin to another folder, then ran certbot --version
, and it gave me the newest version which is in /usr/bin/! This is what I was aiming for but was overcomplicating things I guess.
These use different major versions of Python so the old one shouldnât bother anything.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.