My question is similar to the following, but it does not completely address the problem I am facing: How can I update youtube-dl?
I have first tried this:
sudo youtube-dl -U
which gives the output:
It looks like you installed youtube-dl with a package manager, pip, setup.py or a tarball. Please use that to update.
As mentioned in the answer, I have tried upgrading it using pip:
sudo pip install --upgrade youtube-dl
It seems to have worked for many people. But for me it is giving the following error:
Installing collected packages: youtube-dl
Found existing installation: youtube-dl 2016.2.22
Cannot uninstall 'youtube-dl'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
Please instruct me on how to solve this issue and upgrade youtube-dl properly.
Note: this probably should have been asked in the comment section of the mentioned question, but unfortunately I am unable to comment there, so I had to post it as a new question.
youtube-dl
in the first place? I'm guessing with APT, in which case you should uninstall it with APT:sudo apt remove youtube-dl
then reinstall it another way. – wjandrea Jun 24 '18 at 19:42if [ ! -z $(dpkg -l | grep youtube-dl) ]; then sudo apt-get remove --purge youtube-dl; fi; sudo -H pip install --upgrade youtube-dl
– cmak.fr Jun 24 '18 at 20:35