0

When I type

sudo apt youtube-dl -U 

I get this:

E: Command line option 'U' [from -U] is not understood in combination with the other options.

so I tried pip install --upgrade youtube-dl

and I get: Command 'pip' not found

5
  • you don't have pip package, install it and run pip install --upgrade youtube-dl again Oct 19, 2018 at 18:16
  • youtube-dl is in the regular repos - so no pip needed. Why do you want to "update"?
    – guntbert
    Oct 19, 2018 at 19:57
  • Where did you find the -U flag? If you do sudo apt update youtube-dl what happens?
    – Amanda
    Oct 28, 2018 at 3:31
  • 1
    Possible duplicate of How can I update youtube-dl?
    – karel
    Oct 29, 2018 at 6:01
  • sudo youtube-dl -U Sep 26, 2020 at 17:26

2 Answers 2

2

That's the wrong command, and anyhow the version in the Ubuntu repos (installable through apt) does not receive updates very frequently and is many versions behind. Try removing the version you have installed now and following the guidance on the youtube-dl downloads page.

sudo curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/local/bin/youtube-dl && sudo chmod a+rx /usr/local/bin/youtube-dl

Now when you want to update you don't need apt, just use sudo youtube-dl -U (or use the longer-form --update in place of -U as Hugo already posted).

If you prefer not to use sudo, try installing with pip to your home directory instead with pip install --user youtube_dl and then update regularly with pip install --upgrade --user youtube_dl.

1

If you have Youtube-dl installed then you should be able to run it's own updater.

sudo youtube-dl --update

Not the answer you're looking for? Browse other questions tagged .