How to Install yt-dlp on Debian: A Feature-Rich Audio and Video Downloader

yt-dlp is a command-line audio and video downloader with support for thousands of sites. It began as a fork of youtube-dl and has long since outgrown it: smarter format selection, ffmpeg-backed merging and remuxing, subtitle and metadata embedding, SponsorBlock integration, browser cookie import and a plugin system, all driven from a single command.

The catch is that yt-dlp lives or dies by how recent it is. Sites change their players constantly, and when an extractor breaks upstream it is fixed within days and released almost as often. Debian ships a yt-dlp package, but the version frozen into a stable release ages badly: a downloader that was fine at release time starts failing months later with cryptic extraction errors.

The unofficial deb.griffo.io repository closes that gap. It packages current yt-dlp releases as a standard Debian .deb served over APT, so you track upstream closely while still installing and updating with the tooling you already run for the rest of your system.

Install the Latest yt-dlp on Debian: The Short Version

If you only came for the commands, this adds the repository and installs the latest yt-dlp .deb package on Debian:

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?

  • 🌐 Thousands of sites - A huge, actively maintained set of extractors covering video platforms, broadcasters, podcasts and more.
  • 🎚️ Precise format selection - Pick exactly the stream you want with -f, or describe your preferences once with -S and let yt-dlp sort.
  • 🔧 ffmpeg-powered post-processing - Merge separate video and audio streams, remux to another container, or re-encode on the way out.
  • 🎧 Audio extraction - Pull an MP3, Opus or FLAC out of any supported video in one flag.
  • 💬 Subtitles and captions - Download, convert and embed subtitles, including automatically generated ones.
  • 🏷️ Rich metadata - Embed thumbnails, chapters, descriptions and tags straight into the output file.
  • ⏭️ SponsorBlock aware - Mark or strip sponsor segments, intros and outros during download.
  • 🍪 Browser cookies - Read cookies directly from your browser profile for content that needs a session.
  • 📚 Playlists and archives - Handle whole playlists and channels, and remember what you already fetched.
  • 🔌 Config files and plugins - Persist your defaults in a config file and extend behaviour with plugins.

Why Use the deb.griffo.io Repository?

  • Much closer to upstream than the version frozen in a Debian stable release, which matters more for yt-dlp than for almost any other tool.
  • Easy installation and updates through APT, no pip install --user or curl-to-shell installer.
  • Automatic dependency management handled by Debian packaging, including the Python version yt-dlp needs.
  • No parallel Python environment to maintain outside your package manager.
  • Works across supported Debian releases, with the codename detected automatically.

Prerequisites

Before you start, make sure you have:

  • A Debian-based system (Bookworm 12, Trixie 13, Forky, or Sid)
  • sudo privileges
  • curl installed (sudo apt install curl if needed)

The package depends on Python 3.9 or newer, which every supported Debian release already provides. It also recommends ffmpeg, and you almost certainly want it: modern sites serve video and audio as separate streams, and ffmpeg is what merges them into one file.

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:

  1. Create the keyrings directory - ensures /etc/apt/keyrings exists with proper permissions.
  2. Install the GPG key - downloads the repository key and de-armours it into a dedicated keyring for verification.
  3. Add the repository - writes a signed-by source line, with lsb_release -sc supplying your Debian codename.
  4. 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

Because Debian also carries a yt-dlp package, it is worth confirming which one APT chose:

apt policy yt-dlp

The deb.griffo.io version is normally newer, so APT prefers it on its own. If you want ffmpeg as well, and you do, install it alongside:

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 number tells you at a glance how fresh your extractors are. yt-dlp --help prints the (very long) list of options.

Getting Started with yt-dlp

Your First Download

Point yt-dlp at a URL and it picks the best available quality:

# Download a single video
yt-dlp "https://example.com/watch?v=xxxxxxxx"

# See what formats are on offer first
yt-dlp -F "https://example.com/watch?v=xxxxxxxx"

# Choose a specific format by ID
yt-dlp -f 137+140 "https://example.com/watch?v=xxxxxxxx"

Quote URLs in the shell; query strings are full of characters your shell would otherwise interpret.

Describing What You Want

Rather than hand-picking format IDs every time, describe your preferences and let yt-dlp sort the candidates:

# Cap resolution at 1080p and prefer MP4
yt-dlp -S "res:1080,ext:mp4" URL

# Prefer higher quality codecs, fall back gracefully
yt-dlp -S "vcodec:av01,res,fps" URL

Audio Only

# Extract audio and convert it to MP3
yt-dlp -x --audio-format mp3 URL

# Best available audio, no re-encoding
yt-dlp -f bestaudio URL

Subtitles, Thumbnails and Metadata

# Embed subtitles, thumbnail, chapters and metadata in one pass
yt-dlp --embed-subs --embed-thumbnail --embed-chapters --embed-metadata URL

# Fetch English subtitles as separate files, including auto-generated ones
yt-dlp --write-subs --write-auto-subs --sub-langs en URL

These post-processing steps all run through ffmpeg, which is why it is a recommended dependency rather than an optional extra.

Playlists, Naming and Archives

# Download a playlist into a tidy folder structure
yt-dlp -o "%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s" PLAYLIST_URL

# Keep a record so repeated runs only fetch what is new
yt-dlp --download-archive ~/.local/share/yt-dlp/archive.txt PLAYLIST_URL

The output template system is worth learning; almost any metadata field can become part of the filename or directory layout.

# Remove sponsor and self-promotion segments
yt-dlp --sponsorblock-remove sponsor,selfpromo URL

# Reuse a logged-in session from your browser
yt-dlp --cookies-from-browser firefox URL

Making Your Defaults Stick

Anything you would type on the command line 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

From then on a bare yt-dlp URL behaves exactly how you like. Pass --ignore-config for a one-off run that skips the file.

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. Do not use the built-in yt-dlp -U here: it is meant for self-contained binary installs and has no business rewriting a file the package manager owns. For a tool whose extractors break as often as yt-dlp’s, having upgrades ride along with your normal system updates is the whole point.

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 sifting through what you downloaded.
  • fzf - a fuzzy finder that makes long URL and format lists workable.
  • Zellij - a terminal multiplexer, handy for leaving long playlist downloads 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:

  1. Re-run sudo apt update after adding the repository.
  2. Confirm your release is supported (Bookworm, Trixie, Forky, or Sid).
  3. Inspect the source list: cat /etc/apt/sources.list.d/deb.griffo.io.list.

APT Installed the Debian Version Instead

Debian’s own archive also carries yt-dlp, so two candidates exist. Check which one won:

apt policy yt-dlp

If the older archive version is installed, ask for the repository version explicitly:

sudo apt install --reinstall yt-dlp
sudo apt upgrade yt-dlp

“Unable to Extract” or Similar Errors

Nine times out of ten this means yt-dlp is behind the site it is talking to. Run sudo apt update && sudo apt upgrade and try again; if the failure survives a current version, it belongs in an upstream bug report.

Downloads Produce Separate Video and Audio Files

That is ffmpeg missing. Install it and yt-dlp will merge the streams by itself:

sudo apt install ffmpeg

Conflicting yt-dlp Installations

If you previously installed yt-dlp with pip or by dropping the binary somewhere yourself, that copy may shadow the packaged one:

which -a yt-dlp

Remove the stray binary (or pip uninstall yt-dlp) so the APT-managed yt-dlp in /usr/bin is the one you run.

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

yt-dlp is one of those tools where “latest” is not a preference but a requirement, and that is exactly what a distribution’s frozen archive cannot give you. Installing it from deb.griffo.io keeps you close to upstream releases while leaving APT in charge of dependencies, upgrades and removal.

Add the repository once, install yt-dlp and ffmpeg, put your favourite flags in a config file, and the next broken extractor is fixed by the same apt upgrade you were going to run anyway.

Frequently Asked Questions

How do I install the latest yt-dlp on Debian?

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 Debian. 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. Skip yt-dlp -U, which is intended for self-managed binary installs rather than packaged ones.

Do I need ffmpeg?

In practice, yes. Sites commonly serve video and audio separately, 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 Ubuntu?

Exactly the same way; lsb_release -sc simply resolves to a different codename. There is a companion guide with the Ubuntu specifics: How to install yt-dlp on Ubuntu.

Which Debian releases are supported?

Bookworm 12, Trixie 13, Forky and Sid. Because the repository line is built from lsb_release -sc, the matching suite is selected for you.

Resources


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.