Accidentally deleted certbot file from /home/pi/


My domain is: rather not give this out.

I ran this command: rm * RadioHeadNRF24 hoping it would delete all the files inside the RadioHead folder… it did not… I realised it deleted a certbot file that was in my /home/pi/ directory but I don’t know what it was and I don’t have a backup of it.
I then tried to reinstall certbot again by running (sudo apt-get install python-certbot-apache -t jessie-backports and then certbot --apache)

It produced this output upon running certbot --apache: (I get the same output if I try to run certbot renew or certbot renew --dry-run)

Traceback (most recent call last): File "/usr/bin/certbot", line 6, in <module> from pkg_resources import load_entry_point File "/usr/lib/python2.7/dist-packages/pkg_resources/", line 3019, in <module> @_call_aside File "/usr/lib/python2.7/dist-packages/pkg_resources/", line 3003, in _call_aside f(*args, **kwargs) File "/usr/lib/python2.7/dist-packages/pkg_resources/", line 3032, in _initialize_master_working_set working_set = WorkingSet._build_master() File "/usr/lib/python2.7/dist-packages/pkg_resources/", line 655, in _build_master ws.require(__requires__) File "/usr/lib/python2.7/dist-packages/pkg_resources/", line 963, in require needed = self.resolve(parse_requirements(requirements)) File "/usr/lib/python2.7/dist-packages/pkg_resources/", line 849, in resolve raise DistributionNotFound(req, requirers) pkg_resources.DistributionNotFound: The 'ndg-httpsclient' distribution was not found and is required by requests

My web server is (include version): Apache/2.4.10 (Raspbian)
The operating system my web server runs on is (include version): Raspbian GNU/Linux 8.0 (Jessie)
My hosting provider, if applicable, is: no-ip (my raspberry pi 3)
I can login to a root shell on my machine: yes
I’m using a control panel to manage my site: no

Please help - I only realised I had a problem when I got an email saying my certificates will run out in 19 days.
Does anyone else run Let’s encrypt on their raspberry pi and have the same certbot file in their /home/pi/ directory that I could copy? (wishful thinking?)

Thank you in advance

Hi @PClough,

I guess you realized that the command you wanted was probably rm -r RadioHeadNRF24.

Anyway, is it possible that you were using certbot-auto before rather than certbot from an OS package? It doesn’t seem likely that you could affect the OS package in any way by deleting files from your home directory (nothing from the OS package would have been installed there!), while if you had certbot-auto downloaded into your home directory, you would have deleted it when you ran the rm * command.

Yes, I realised the mistake I made pretty sharpish :slight_smile:

Yes I think I did use the certbot-auto. Would deleting the certbot-auto file affect why I get the error when running cerbot-renew --dryrun?

I am thinking of purging/removing certbot and starting again. Is this a sensible thing to do?

Thank you!

Just fixed it! I was missing the python-ndg-httpsclient package somehow. So I just installed it and ran the renew command again and it worked. :smile:

Thank you for replying.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.