Skip to main content


what exactly am I doing adding deb http://ftp.us.debian.org/debian sid main to my etc/apt/sources.list? trying to install newest yt-dlp on debian 12.6


All I wanted is to install the current yt-dlp (2024.07.16-1) on debian 12.6.

Suggested way to that according to packages.debian.org/sid/all/yt… is to add that line to that file (etc/apt/sources.list), but do I really need to download the 1600 files that upgrade would entail?

I don't want to download the tar.gz 'cause upgrading that would be a pain.

in reply to merompetehla

I would advise just creating ~/.bin or ~/.local/share/bin and dropping it in there. As long as you have permission to that directory, yt-dlp should be able to easily update itself.
in reply to dragonfly4933

this is the way. easy. no install. no extra steps. update when you want.

or you can add the ppa that's listed in the yt-dlp install instructions (scroll down to third-party package managers > apt) and use apt to install it like any other package.

This entry was edited (4 months ago)
in reply to merompetehla

In best scenario you'll turn your Debian to SID. Worst case scenario you'll break your system.

I do not suggest this operation unless you're sure what you're doing.

Alternatively you can install yt-dlp using snap or using Nix Package manager

in reply to merompetehla

Debian sid is their unstable branch; it contains all new packages before they are tested. As such, if you try to install updates from it, you'll likely get a very unstable system.

You can set it up so that you only get a specific package ( wiki.debian.org/DebianUnstable… ), but honestly, if you need the very latest version, I'd recommend just grabbing it from github or wherever. Iirc, yt-dlp has a -U flag which will automatically update it.

in reply to merompetehla

You're adding the full repository of Debian unstable to your system. This wouldn't just enable you to install yt-dlp but it would also turn your whole system from Debian stable to Debian unstable on the next update. Total overkill for one package.
in reply to merompetehla

github.com/yt-dlp/yt-dlp/wiki/…

Normally I try to use apt for everything, but yt-dlp is an exception since when you want it, you probably do actually want the latest version. I think the only thing it depends on is python, so simple enough to get it from git one way or another.

PS: Now that I actually look at that page I linked to, I see there's a PPA repo you could use. I don't know who runs it or how up-to-date it is, but it's probably a better bet than what you were trying.

This entry was edited (4 months ago)
in reply to merompetehla

It's best to install yt-dlp manually and let it self update. It needs to be kept on the latest version since youtube is constantly breaking things. It's only a single file and it can be installed in any directory in your $PATH.
in reply to merompetehla

Do not do this. You'll create a Frankendebian and your updates could (and probably will) break your system. Try to use a PPA instead, since Ubuntu is Debian-based.
in reply to merompetehla

If you want the latest version of most python apps, I'd recommend using pipx, since it'll create python virtual environments for each app installed, and won't mess with system packages.
in reply to merompetehla

pipx install yt-dlp

This will install yt-dlp with everything it needs but without fucking anything else up, both system-wise and for your user (because installing python packages in your home manually can cause problems). You must have your $HOME/.local/bin in $PATH to then be able to run yt-dlp, but I think pipx will check and warn you.

pipx upgrade yt-dlp to update it (or upgrade-all)

in reply to taaz

That’s what I do, except I straight up create the python venv in a folder, activate it and then do pip install yt-dlp. No messing up with my system.
This entry was edited (4 months ago)
in reply to Baldur Nil

pipx does that without this manual process - it's meant for these standalone apps that are in your $PATH.
This entry was edited (4 months ago)
in reply to Eager Eagle

It’s a good concept, I just have to look it up and understand exactly what it is doing before I start using it.
This entry was edited (4 months ago)
in reply to merompetehla

If you're not running sid, do not look for install instructions on the sid page. If you're on 12.6, that's Bookworm (current stable name), look there for help with 12 stuff.

Best way to use the current #yt-dlp is to uninstall the one from the repo, and grab the current release from the github page and drop it in $PATH somewhere.

Linux reshared this.

in reply to merompetehla

The latest yt-dlp is in bookworm-backports.

wiki.debian.org/Backports

This entry was edited (4 months ago)
in reply to merompetehla

Just install it via pip and then symlink its binary file to /usr/bin.

t. Am running a live stream 24/7 on my orange pi zero 3 (via ffplay/yt-dlp) since forever.

"Why not simply add $HOME/.local/bin to $PATH?"

Because it breaks things. While symlinking it does not.

"Why?"

No idea, honestly.

Also, you can take a step further and make a tmpfs partition @ $HOME/.local and then add the following line to your .bash_profile file:
TMPDIR=$HOME/.local pip install --break-system-packages -I --no-input yt-dlp &&.

This entry was edited (4 months ago)
in reply to GustavoM

use pipx install or your distro's package instead of pip install --break-system-packages
in reply to GustavoM

why would you want to nuke your installed cli apps on every boot with a tmpfs
in reply to Eager Eagle

Eh, it's a tradeoff that I get in exchange of a longer microsd lifespan. Which I'm completely fine with.
in reply to merompetehla

This entry was edited (4 months ago)