23 Installation
Adrika Panwar edited this page 2024-10-28 21:02:16 +05:30

You can install yt-dlp either using one of the official releases, or with your favorite package manager

If you are unfamiliar with the command line, you may use one of the many third-party GUIs available


Using the release binary

You can simply download the correct binary file for your OS

Windows Linux MacOS Other variants

In UNIX-like OSes (MacOS, Linux, BSD), you can also install the application into a location in your $PATH, such as ~/.local/bin, in one of the following ways:

curl -L https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -o ~/.local/bin/yt-dlp
chmod a+rx ~/.local/bin/yt-dlp  # Make executable
wget https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -O ~/.local/bin/yt-dlp
chmod a+rx ~/.local/bin/yt-dlp  # Make executable
aria2c https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp --dir ~/.local/bin -o yt-dlp
chmod a+rx ~/.local/bin/yt-dlp  # Make executable

To update, run:

yt-dlp -U

To use shell completion (autocomplete), look for the completion files in the source tarball. It comes with bash, fish & zsh support.

With pip

You can install the PyPI package with:

python3 -m pip install -U "yt-dlp[default]"

You can install without any of the optional dependencies using:

python3 -m pip install --no-deps -U yt-dlp

You can also install the nightly version of yt-dlp with:

python3 -m pip install -U --pre "yt-dlp[default]"

If you want to be on the bleeding edge, you can also install the master branch with:

python3 -m pip install -U pip hatchling wheel
python3 -m pip install --force-reinstall "yt-dlp[default] @ https://github.com/yt-dlp/yt-dlp/archive/master.tar.gz"

On some systems, you may need to use py or python instead of python3

To update, run:

python3 -m pip install -U "yt-dlp[default]"

Third-party package managers

Note: These packages are maintained by third-parties and may not be up-to-date. Please report any issues to the respective package maintainers

Packaging status

Linux/MacOS

Homebrew

macOS or Linux users that are using Homebrew can also install it by:

brew install yt-dlp

To update, run:

brew upgrade yt-dlp

pacman

Arch Linux users can install it from the official community repository:

sudo pacman -Syu yt-dlp

pacman will now automatically download the correct dependencies and keep the package up-to-date whenever you update your system with:

sudo pacman -Syu

APT

You can download and install yt-dlp for recent Ubuntu and other related Debian-based distributions by adding this PPA

sudo add-apt-repository ppa:tomtomtom/yt-dlp    # Add ppa repo to apt
sudo apt update                                 # Update package list
sudo apt install yt-dlp                         # Install yt-dlp

Your system's package manager will now automatically download the correct dependencies and keep the package updated with the rest of your system whenever you run:

sudo apt update
sudo apt install yt-dlp

Snap

You can install yt-dlp on Linux using Snap:

sudo snap install --edge yt-dlp

To manually update, run:

sudo snap refresh --edge yt-dlp

MacPorts

You can install yt-dlp on macOS using MacPorts:

sudo port install yt-dlp

To update, run:

sudo port selfupdate
sudo port upgrade yt-dlp

Alpine Linux

Make sure you're on the latest version (or edge) - older versions don't receive updates for community repo.

To install yt-dlp on Alpine Linux:

doas apk -U add yt-dlp

Or alternatively, without any optional dependencies:

doas apk -U add yt-dlp-core

yt-dlp should upgrade with your system. If you want to do that explicitly:

doas apk -U upgrade yt-dlp

To uninstall:

doas apk del yt-dlp

On postmarketOS you might have to use sudo instead of doas.

Windows

Scoop

scoop install yt-dlp

To update, run:

scoop update yt-dlp

Chocolatey

choco install yt-dlp

To update, run:

choco upgrade yt-dlp

winget

winget install yt-dlp

To update, run:

winget upgrade yt-dlp

Android

You can use yt-dlp on Android using Termux. Once Termux is installed, open it and run the following commands:

termux-setup-storage                 # Allow termux to download files into your phone's storage
pkg update && pkg upgrade            # Update all packages
pkg install libexpat openssl python  # Install python
pip install -U "yt-dlp[default]"     # Install yt-dlp with default dependencies
pkg install ffmpeg                   # OPTIONAL: Install ffmpeg

To update, run:

pip install -U "yt-dlp[default]"