How to Install yt-dlp on Ubuntu: A Feature-Rich Audio and Video Downloader
yt-dlp is the command-line downloader most people reach for when they need audio or video off the web. A youtube-dl fork that took on a life of its own, it now covers thousands of sites and wraps that reach in an unusually deep feature set: expressive format selection, ffmpeg post-processing, subtitle and metadata embedding, SponsorBlock support, cookie import from your browser, and a plugin interface for everything else.
There is one property yt-dlp needs above all others, though: freshness. Streaming sites rework their players regularly, extractors break, and upstream ships fixes on a near-weekly cadence. Ubuntu packages yt-dlp, but the copy in an LTS archive is a snapshot from release day, and a snapshot is precisely what a downloader cannot afford to be.
The unofficial deb.griffo.io repository offers a middle path: recent yt-dlp releases packaged as a proper Ubuntu .deb and delivered over APT, so you stay close to upstream without stepping outside your package manager.
Install the Latest yt-dlp on Ubuntu: The Short Version
If you only came for the commands, this adds the repository and installs the latest yt-dlp .deb package on Ubuntu:
sudo install -d -m 0755 /etc/apt/keyrings
curl -fsSL https://deb.griffo.io/EA0F721D231FDD3A0A17B9AC7808B4DD62C41256.asc | sudo gpg --dearmor --yes -o /etc/apt/keyrings/deb.griffo.io.gpg
echo "deb [signed-by=/etc/apt/keyrings/deb.griffo.io.gpg] https://deb.griffo.io/apt $(lsb_release -sc 2>/dev/null) main" | sudo tee /etc/apt/sources.list.d/deb.griffo.io.list > /dev/null
sudo apt update
sudo apt install yt-dlp
The rest of this guide explains what each command does, how to verify the install, how to keep yt-dlp up to date, and what to check when something goes wrong.
What Makes yt-dlp Special?
- 🌐 Enormous site coverage - Actively maintained extractors for thousands of platforms, broadcasters and podcast hosts.
- 🎚️ Format selection that scales - Name an exact stream with
-f, or state your preferences once with-Sand let yt-dlp rank what it finds. - 🔧 ffmpeg post-processing - Merge split video and audio streams, remux into another container, or convert on the way out.
- 🎧 One-flag audio extraction - Turn any supported video into MP3, Opus or FLAC.
- 💬 Subtitle handling - Download, convert and embed subtitles, auto-generated tracks included.
- 🏷️ Metadata baked in - Thumbnails, chapters, descriptions and tags written straight into the file.
- ⏭️ SponsorBlock integration - Skip or strip sponsor reads, intros and outros as part of the download.
- 🍪 Cookies from your browser - Reuse an existing logged-in session without exporting anything by hand.
- 📚 Playlists and download archives - Grab whole channels and remember what you already have.
- 🔌 Config files and plugins - Keep your defaults in one place and extend yt-dlp when the defaults are not enough.
Why Use the deb.griffo.io Repository?
- Far closer to upstream than the version pinned in an Ubuntu LTS archive, which matters more for yt-dlp than for most tools.
- Easy installation and updates through APT, no
pip install --userand no piped installer script. - Automatic dependency management handled by Debian packaging, Python version included.
- No separate Python environment living outside your package manager.
- Works across supported Ubuntu releases, with the codename detected automatically.
Prerequisites
Before you start, make sure you have:
- An Ubuntu system (Jammy 22.04 LTS, Noble 24.04 LTS, or newer)
sudoprivilegescurlinstalled (sudo apt install curlif needed)
The package needs Python 3.9 or newer, which every supported Ubuntu release ships. It also recommends ffmpeg, and in practice you want it: most sites deliver video and audio as separate streams, and ffmpeg is the piece that stitches them together.
Step 1: Add the deb.griffo.io Repository
Add the signing key and repository source:
# Create the keyrings directory
sudo install -d -m 0755 /etc/apt/keyrings
# Download and install the repository GPG key
curl -fsSL https://deb.griffo.io/EA0F721D231FDD3A0A17B9AC7808B4DD62C41256.asc | sudo gpg --dearmor --yes -o /etc/apt/keyrings/deb.griffo.io.gpg
# Add the repository (auto-detects your distro codename)
echo "deb [signed-by=/etc/apt/keyrings/deb.griffo.io.gpg] https://deb.griffo.io/apt $(lsb_release -sc 2>/dev/null) main" | sudo tee /etc/apt/sources.list.d/deb.griffo.io.list > /dev/null
# Update the package list
sudo apt update
What each command does:
- Create the keyrings directory - ensures
/etc/apt/keyringsexists with proper permissions. - Install the GPG key - downloads the repository key and de-armours it into a dedicated keyring for verification.
- Add the repository - writes a
signed-bysource line, withlsb_release -scsupplying your Ubuntu codename. - Update the package list - refreshes APT so it knows about the new packages.
Step 2: Update the Package List
If you skipped the last line, run the update now:
sudo apt update
Step 3: Install yt-dlp
Install yt-dlp with APT:
sudo apt install yt-dlp
Ubuntu’s own universe archive also contains a yt-dlp package, so it is worth checking which candidate APT picked:
apt policy yt-dlp
The deb.griffo.io build is normally the newer of the two, so APT prefers it without any pinning. Add ffmpeg while you are here:
sudo apt install ffmpeg
Step 4: Verify the Installation
The binary is simply yt-dlp. Confirm the version:
yt-dlp --version
You should see a date-based version similar to:
2026.07.04
yt-dlp uses calendar versioning, so the version number doubles as an age check on your extractors. Run yt-dlp --help for the full option list, and be ready to scroll.
Getting Started with yt-dlp
Your First Download
Give yt-dlp a URL and it fetches the best quality it can assemble:
# Download a single video
yt-dlp "https://example.com/watch?v=xxxxxxxx"
# Inspect the available formats first
yt-dlp -F "https://example.com/watch?v=xxxxxxxx"
# Request specific format IDs
yt-dlp -f 137+140 "https://example.com/watch?v=xxxxxxxx"
Always quote URLs; ? and & in query strings mean something else entirely to your shell.
Sorting Instead of Picking
Hand-picking format IDs gets old quickly. Describe what you care about and let yt-dlp order the candidates:
# Cap at 1080p, prefer MP4
yt-dlp -S "res:1080,ext:mp4" URL
# Prefer modern codecs, then resolution, then frame rate
yt-dlp -S "vcodec:av01,res,fps" URL
Audio Only
# Extract the audio track and convert it to MP3
yt-dlp -x --audio-format mp3 URL
# Keep the best audio exactly as delivered
yt-dlp -f bestaudio URL
Subtitles, Thumbnails and Metadata
# Embed subtitles, thumbnail, chapters and metadata in a single run
yt-dlp --embed-subs --embed-thumbnail --embed-chapters --embed-metadata URL
# Save English subtitles as separate files, auto-generated ones included
yt-dlp --write-subs --write-auto-subs --sub-langs en URL
Every one of these steps is handled by ffmpeg, which is why it is a recommended dependency rather than a nicety.
Playlists, Naming and Archives
# Give a playlist a sensible folder and file layout
yt-dlp -o "%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s" PLAYLIST_URL
# Track what you already downloaded so reruns only fetch new items
yt-dlp --download-archive ~/.local/share/yt-dlp/archive.txt PLAYLIST_URL
The output template language is worth an afternoon: nearly any metadata field can shape your filenames and directories.
Sponsor Segments and Cookies
# Strip sponsor and self-promotion segments
yt-dlp --sponsorblock-remove sponsor,selfpromo URL
# Borrow a logged-in session from your browser
yt-dlp --cookies-from-browser firefox URL
Making Your Defaults Stick
Anything you can type as a flag can live in a config file instead:
mkdir -p ~/.config/yt-dlp
printf '%s\n' \
'-S res:1080,ext:mp4' \
'--embed-metadata' \
'--embed-thumbnail' \
'-o ~/Videos/%(title)s.%(ext)s' \
> ~/.config/yt-dlp/config
After that, a bare yt-dlp URL does the right thing. Use --ignore-config when you want a single run without it.
Keeping yt-dlp Updated
Because yt-dlp arrived via APT, updates come with the rest of the system:
sudo apt update && sudo apt upgrade
Whenever deb.griffo.io ships a newer yt-dlp, apt upgrade installs it automatically. Leave yt-dlp -U alone on a packaged install; it exists for self-contained binaries and should not be overwriting files APT owns. Given how often extractors need fixing, folding yt-dlp into your ordinary update routine is the real win here.
Other Tools from deb.griffo.io
The repository packages plenty of tools that fit naturally alongside yt-dlp:
- Yazi - a blazing fast terminal file manager for going through what you downloaded.
- fzf - a fuzzy finder that tames long URL and format lists.
- Zellij - a terminal multiplexer, useful for leaving big playlist jobs running.
- Ghostty - a fast, GPU-accelerated terminal emulator.
Troubleshooting
GPG or Key Errors
If APT reports an unsigned repository or an invalid key, import it again:
curl -fsSL https://deb.griffo.io/EA0F721D231FDD3A0A17B9AC7808B4DD62C41256.asc | sudo gpg --dearmor --yes -o /etc/apt/keyrings/deb.griffo.io.gpg
sudo apt update
Package Not Found
If APT cannot see the yt-dlp package:
- Re-run
sudo apt updateafter adding the repository. - Confirm your release is supported (Jammy 22.04 LTS, Noble 24.04 LTS, or newer).
- Inspect the source list:
cat /etc/apt/sources.list.d/deb.griffo.io.list.
APT Installed the Ubuntu Version Instead
Ubuntu’s universe component ships its own yt-dlp, so APT has two candidates to choose from. See which one it took:
apt policy yt-dlp
If you ended up with the older archive build, push APT towards the repository version:
sudo apt install --reinstall yt-dlp
sudo apt upgrade yt-dlp
“Unable to Extract” or Similar Errors
This almost always means yt-dlp has fallen behind the site. Run sudo apt update && sudo apt upgrade first; if a current version still fails, that is a genuine upstream issue worth reporting.
Downloads Produce Separate Video and Audio Files
ffmpeg is missing. Install it and yt-dlp merges the streams for you:
sudo apt install ffmpeg
Conflicting yt-dlp Installations
If you installed yt-dlp earlier with pip, snap or a manually placed binary, that copy can shadow the packaged one:
which -a yt-dlp
Remove the stray copy (pip uninstall yt-dlp, sudo snap remove yt-dlp) so the APT-managed binary in /usr/bin is the one your shell finds.
Uninstalling
Remove yt-dlp with:
sudo apt remove yt-dlp
To also drop the repository and key:
sudo rm /etc/apt/sources.list.d/deb.griffo.io.list
sudo rm /etc/apt/keyrings/deb.griffo.io.gpg
sudo apt update
Conclusion
For most software, running whatever the archive ships is perfectly sensible. yt-dlp is the exception: an outdated copy is not merely missing features, it is a copy that fails on the sites you actually use. Installing it from deb.griffo.io keeps you near upstream releases while APT still handles dependencies, upgrades and removal.
Add the repository once, install yt-dlp alongside ffmpeg, write your preferred flags into a config file, and the next round of extractor fixes lands with the same apt upgrade you already run.
Frequently Asked Questions
How do I install the latest yt-dlp on Ubuntu?
Add the deb.griffo.io APT repository and its signing key, then run sudo apt install yt-dlp. The repository tracks upstream yt-dlp releases, so you get the latest packaged version rather than a build frozen when your distribution was released.
Is there a .deb package for yt-dlp?
Yes. deb.griffo.io publishes yt-dlp as a signed .deb for Ubuntu. You could download that .deb and install it by hand, but adding the repository is the better option: APT then resolves dependencies and picks up new versions on its own.
How do I update yt-dlp to the latest version?
Run sudo apt update && sudo apt upgrade. Avoid yt-dlp -U, which targets self-managed binary installs rather than packaged ones.
Do I need ffmpeg?
Effectively yes. Sites routinely serve video and audio as separate streams, and ffmpeg is what merges them, converts audio for -x, and embeds subtitles, chapters and thumbnails. Install it with sudo apt install ffmpeg.
How do I install yt-dlp on Debian?
Exactly the same way; lsb_release -sc simply resolves to a different codename. There is a companion guide with the Debian specifics: How to install yt-dlp on Debian.
Which Ubuntu releases are supported?
Jammy 22.04 LTS, Noble 24.04 LTS and newer. Because the repository line is built from lsb_release -sc, the matching suite is selected for you.
Resources
- yt-dlp GitHub Repository
- yt-dlp Packaging Repository
- deb.griffo.io Repository
- Install guide on deb.griffo.io
Disclaimer: The deb.griffo.io repository is an unofficial community project and is not affiliated with the official Debian or Ubuntu projects, or with the upstream yt-dlp project. Download only content you have the right to download, and respect the terms of service of the sites you use.