Skip to content
yt-dlp

Install yt-dlp on Linux

Install yt-dlp and ffmpeg on Linux from your package manager, pipx or the official binary.

1. Install yt-dlp

Distribution packages are convenient but often lag by months, and yt-dlp is a tool where being three months behind means extractors that no longer work. pipx or the official binary keep you current.

pipx install yt-dlp

Or the standalone binary, which bundles everything and self-updates:

sudo curl -L https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -o /usr/local/bin/yt-dlp
sudo chmod a+rx /usr/local/bin/yt-dlp

2. Install ffmpeg

sudo apt install ffmpeg      # Debian, Ubuntu
sudo dnf install ffmpeg      # Fedora
sudo pacman -S ffmpeg        # Arch

On Fedora, ffmpeg lives in RPM Fusion; enable that repository first if the package is not found.

3. Check it worked

yt-dlp --version
ffmpeg -version

Cookies on a headless machine

--cookies-from-browser needs a browser profile on the same machine, so on a server it is not an option. Export a Netscape-format cookies.txt on your desktop, copy it across and point at it with --cookies. Treat that file as a credential — it is a live session.

Updating

yt-dlp -U               # standalone binary
pipx upgrade yt-dlp     # pipx

Installed from your distribution's repository, update it with the package manager; -U will refuse to touch a file it does not own.

Frequently asked questions

Should I use my distribution's yt-dlp package?
It works, but distribution packages are often months behind, and an out-of-date yt-dlp means extractors that have stopped working. pipx or the official binary keep you current.
ffmpeg is not in my repository.
On Fedora it lives in RPM Fusion, which has to be enabled first. Most other distributions ship it in the main repository.
How do I update yt-dlp?
A standalone binary updates itself with yt-dlp -U. Installed through a package manager, update it with that manager instead; self-update refuses to modify a file it does not own. Updating fixes more problems than any single flag.