youtube-dl is no longer the practical starting point for Linux downloads. Install yt-dlp instead: it keeps the familiar command-line workflow, receives current extractor fixes, and works with FFmpeg when a site serves video and audio as separate streams.
Install yt-dlp on Debian or Ubuntu
For a distro-managed installation, install yt-dlp and FFmpeg from your package repository. The package names below were checked against Debian’s current APT metadata.
sudo apt update
sudo apt install yt-dlp ffmpeg
Confirm that the command is available after installation.
yt-dlp --version
Repository packages fit a system you update through APT. The yt-dlp project changes frequently, so use its current installation guidance when you need a newer extractor than your distribution ships.
Install the current Python package in an isolated environment
Do not use sudo pip to place yt-dlp into your system Python. A virtual environment keeps its files separate from packages managed by your distribution.
python3 -m venv ~/.local/share/yt-dlp
~/.local/share/yt-dlp/bin/python -m pip install --upgrade "yt-dlp[default]"
~/.local/share/yt-dlp/bin/yt-dlp --version
I installed the current package in a fresh environment for this refresh and checked its version command. The current package reported 2026.07.04.
Why FFmpeg belongs in the setup
Many services offer a high-quality video stream and an audio stream separately, so yt-dlp uses the FFmpeg binary to merge them and for several post-processing operations.
Install the distribution package rather than a Python package named ffmpeg. On Debian or Ubuntu, the earlier apt command supplies the binary yt-dlp needs.
Download a video you are allowed to save
Pass a page URL to yt-dlp for its default selection, and replace VIDEO_URL only with a URL whose terms and rights allow you to save it.
yt-dlp "VIDEO_URL"
Use format listing before selecting a specific stream because it prints that URL’s identifiers and available resolutions.
yt-dlp -F "VIDEO_URL"
When FFmpeg is installed, this selection asks for the best available video and audio combination, then requests an MP4 container where possible.
yt-dlp -f "bv*+ba/b" --merge-output-format mp4 "VIDEO_URL"
Save audio only
The extract-audio option requires FFmpeg to convert the downloaded media, and the source terms still determine what you may save.
yt-dlp -x --audio-format mp3 "VIDEO_URL"
When a YouTube command warns about JavaScript
Current YouTube extraction can require a supported JavaScript runtime, and the project’s JavaScript runtime guidance explains the available setup when formats may be missing.
I reproduced the warning during a simulated YouTube check. A version command confirms the installation, while each site URL can still have its own extraction requirements.
Keep yt-dlp current
Run the same installation command again to update a virtual-environment install, or update a repository install through your distribution’s package process.
~/.local/share/yt-dlp/bin/python -m pip install --upgrade "yt-dlp[default]"
Start with the project’s official README when a site changes its extraction requirements or you need subtitles, playlists, cookies, or advanced format rules.
Sources
- yt-dlp README for installation channels, FFmpeg requirements, and command options.
- yt-dlp installation documentation for Linux package-manager and Python installation paths.
- ArchWiki yt-dlp page for Linux usage and dependency context.
