I installed youtube-dl from the 17.04 package repositories. It currently ships version 2017.03.10. However, youtube-dl is one of these packages that are updated very frequently (as of writing this post it is version 2017.04.11) and quite often you actually need to have the latest version for it to work with the latest changes done by YouTube.

For packages that change very frequently — like youtube-dl — what is the preferred and recommended installation method?

  • I would suggest using pip. – edwinksl Apr 11 '17 at 5:33
  • This would depend on who's recommending and preferring. Some would say "use the developer's recommendation", some would say, "trust the distro maintainers to update when needed", some would say, "maintain your own packages, build from source". – muru Apr 11 '17 at 5:35
  • Possible duplicate of How can I update youtube-dl? – David Foerster Apr 12 '17 at 9:51
  • use snap to install latest version sudo snap install youtube-dl – C.K Apr 9 '20 at 14:12

The biggest advantage of using pip is that we can download and install any version of the required package that has been uploaded on the repository of Python modules (PyPI). By using apt-get, we can only get the latest version of the package that is hosted on Canonical. That's because Canonical only hosts a single version of any package. If you want to install a particular version, then pip is the recommended way. But in this case, as you said youtube-dl is updated very frequently and sometimes latest version is required for it to work with youtube, it doesn't make much difference whether you use apt-get or pip, but I would recommend:

sudo apt-get install youtube-dl

Alternatively use snap to install latest version of youtube-dl.

sudo snap install youtube-dl # start with snap run youtube-dl

Not the answer you're looking for? Browse other questions tagged or ask your own question.