The best way to install yt-dlp on Linux & Android
This guide describes the Truly Best Way® to install yt-dlp on any platform, thanks to uv.
First come the executive summaries and then the details.
Linux
uv tool install "yt-dlp[default,curl-cffi,deno]"
-
If using GNOME, add
secretstorage:uv tool install "yt-dlp[default,curl-cffi,deno,secretstorage]" -
In all cases you need ffmpeg installed.
Termux (Android):
pkg install uv clang ffmpeg deno
uv tool install "yt-dlp[default,curl-cffi]"
brotliandcffidon’t build withoutclangdenobuild viauvthrows and “unsupported platform” error (it seems to require some fixes to manually build in Termux); luckily Termux devs maintain it for us.
There is also the Termux-maintained python-yt-dlp, which relies on python-pip (which pulls in clang), but the last time I tried it ended up without mutagen installed (which isn’t packaged in Termux), so there’s that.
Management
To upgrade the package:
uv tool upgrade yt-dlp
To remove it:
uv tool uninstall yt-dlp
You cannot do cleaner than that. uv ❤️
Details
The pyproject.toml describes what each optional dependency group brings in. As of 2026-10-24:
[project.optional-dependencies]
default = [
"brotli ; implementation_name == 'cpython' and sys_platform != 'ios'",
"brotlicffi ; implementation_name != 'cpython'",
"certifi>=2026.10.19",
"mutagen",
"pycryptodomex",
"requests>=2.32.2,<3",
"urllib3>=2.0.2,<3",
"websockets>=13.0",
"yt-dlp-ejs==0.8.0",
]
curl-cffi = [
"curl-cffi>=0.5.10,!=0.6.*,!=0.7.*,!=0.8.*,!=0.9.*,<0.17 ; implementation_name == 'cpython'",
]
secretstorage = [
"secretstorage",
]
deno = [
"deno>=2.9.8",
]
The README’s Dependencies section explicits each of those.
As noted above, secretstorage is only useful “for --cookies-from-browser to access the Gnome keyring while decrypting cookies of Chromium-based browsers on Linux”. I include it even though I use Firefox because why not, you never know.
Results
No more Python packaging hell, no more missing dependencies; you end up with a clean and nearly self-contained build of yt-dlp.
Plus, uv can be reused for any of other Python/pip packages, which I highly recommend you do.
That’s all folks, enjoy using yt-dlp and spread the gospel of uv!