Ubuntu Tutorial

How To Install youtube-dl on Ubuntu

Posted on April 1, 2023  (Last modified on May 20, 2023 )
8 minutes  • 1617 words

Introduction

In this tutorial we learn how to install youtube-dl on Ubuntu.

What is youtube-dl

youtube-dl is:

youtube-dl is a small command-line program to download videos from YouTube.com and other sites that don’t provide direct links to the videos served.

youtube-dl allows the user, among other things, to choose a specific video quality to download (if available) or let the program automatically determine the best (or worst) quality video to grab. It supports downloading entire playlists and all videos from a given user.

Currently supported sites (or features of sites) are:

1tv, 20min, 220.ro, 23video, 24video, 3qsdn, 3sat, 4tube, 56.com, 5min, 6play, 7plus, 8tracks, 91porn, 9c9media, 9gag, 9now.com.au, abc.net.au, abc.net.au:iview, abcnews, abcnews:video, abcotvs, abcotvs:clips, AcademicEarth:Course, acast, acast:channel, ADN, AdobeConnect, adobetv, adobetv:channel, adobetv:embed, adobetv:show, adobetv:video, AdultSwim, aenetworks, aenetworks:collection, aenetworks:show, afreecatv, AirMozilla, AliExpressLive, AlJazeera, Allocine, AlphaPorno, Amara, AMCNetworks, AmericasTestKitchen, AmericasTestKitchenSeason, anderetijden, AnimeOnDemand, Anvato, aol.com, APA, Aparat, AppleConnect, AppleDaily, ApplePodcasts, appletrailers, appletrailers:section, archive.org, ArcPublishing, ARD, ARD:mediathek, ARDBetaMediathek, Arkena, arte.sky.it, ArteTV, ArteTVEmbed, ArteTVPlaylist, AsianCrush, AsianCrushPlaylist, AtresPlayer, ATTTechChannel, ATVAt, AudiMedia, AudioBoom, audiomack, audiomack:album, AWAAN, awaan:live, awaan:season, awaan:video, AZMedien, BaiduVideo, Bandcamp, Bandcamp:album, Bandcamp:weekly, bangumi.bilibili.com, bbc, bbc.co.uk, bbc.co.uk:article, bbc.co.uk:iplayer:playlist, bbc.co.uk:playlist, BBVTV, Beatport, Beeg, BehindKink, Bellator, BellMedia, Bet, bfi:player, bfmtv, bfmtv:article, bfmtv:live, BibelTV, Bigflix, Bild, BiliBili, BilibiliAudio, BilibiliAudioAlbum, BiliBiliPlayer, BioBioChileTV, Biography, BIQLE, BitChute, BitChuteChannel, BleacherReport, BleacherReportCMS, blinkx, Bloomberg, BokeCC, BongaCams, BostonGlobe, Box, Bpb, BR, BravoTV, Break, brightcove:legacy, brightcove:new, BRMediathek, bt:article, bt:vestlendingen, BusinessInsider, BuzzFeed, BYUtv, Camdemy, CamdemyFolder, CamModels, CamTube, CamWithHer, canalc2.tv, Canalplus, Canvas, CanvasEen, CarambaTV, CarambaTVPage, CartoonNetwork, cbc.ca, cbc.ca:olympics, cbc.ca:player, cbc.ca:watch, cbc.ca:watch:video, CBS, CBSInteractive, CBSLocal, CBSLocalArticle, cbsnews, cbsnews:embed, cbsnews:livevideo, CBSSports, CCMA, CCTV, CDA, CeskaTelevize, CeskaTelevizePorady, channel9, CharlieRose, Chaturbate, Chilloutzone, chirbit, chirbit:profile, cielotv.it, Cinchcast, Cinemax, CiscoLiveSearch, CiscoLiveSession, CJSW, cliphunter, Clippit, ClipRs, Clipsyndicate, CloserToTruth, CloudflareStream, Cloudy, Clubic, Clyp, cmt.com, CNBC, CNBCVideo, CNN, CNNArticle, CNNBlogs, ComedyCentral, ComedyCentralTV, CommonMistakes, CondeNast, CONtv, Corus, Coub, Cracked, Crackle, CrooksAndLiars, crunchyroll, crunchyroll:playlist, CSpan, CtsNews, CTV, CTVNews, cu.ntv.co.jp, Culturebox, CultureUnplugged, curiositystream, curiositystream:collection, CWTV, DailyMail, dailymotion, dailymotion:playlist, dailymotion:user, daum.net, daum.net:clip, daum.net:playlist, daum.net:user, DBTV, DctpTv, DeezerPlaylist, defense.gouv.fr, democracynow, DHM, Digg, DigitallySpeaking, Digiteka, Discovery, DiscoveryGo, DiscoveryGoPlaylist, DiscoveryNetworksDe, DiscoveryVR, Disney, dlive:stream, dlive:vod, Dotsub, DouyuShow, DouyuTV, DPlay, DRBonanza, Dropbox, DrTuber, drtv, drtv:live, DTube, Dumpert, dvtv, dw, dw:article, EaglePlatform, EbaumsWorld, EchoMsk, egghead:course, egghead:lesson, ehftv, eHow, EinsUndEinsTV, Einthusan, eitb.tv, EllenTube, EllenTubePlaylist, EllenTubeVideo, ElPais, Embedly, EMPFlix, Engadget, Eporner, EroProfile, Escapist, ESPN, ESPNArticle, EsriVideo, Europa, EWETV, ExpoTV, Expressen, ExtremeTube, EyedoTV, facebook, FacebookPluginsVideo, faz.net, fc2, fc2:embed, Fczenit, filmon, filmon:channel, Filmweb, FiveThirtyEight, FiveTV, Flickr, Folketinget, FootyRoom, Formula1, FOX, FOX9, FOX9News, Foxgay, foxnews, foxnews:article, FoxSports, france2.fr:generation-what, FranceCulture, FranceInter, FranceTV, FranceTVEmbed, francetvinfo.fr, FranceTVJeunesse, FranceTVSite, Freesound, freespeech.org, FreshLive, FrontendMasters, FrontendMastersCourse, FrontendMastersLesson, FujiTVFODPlus7, Funimation, Funk, Fusion, Fux, Gaia, GameInformer, GameSpot, GameStar, Gaskrank, Gazeta, GDCVault, generic, Gfycat, GiantBomb, Giga, GlattvisionTV, Glide, Globo, GloboArticle, Go, GodTube, Golem, google:podcasts, google:podcasts:feed, GoogleDrive, Goshgay, GPUTechConf, Groupon, hbo, HearThisAt, Heise, HellPorno, Helsinki, HentaiStigma, hetklokhuis, hgtv.com:show, HiDive, HistoricFilms, history:player, history:topic, hitbox, hitbox:live, HitRecord, hketv, HornBunny, HotNewHipHop, hotstar, hotstar:playlist, Howcast, HowStuffWorks, HRTi, HRTiPlaylist, Huajiao, HuffPost, Hungama, HungamaSong, Hypem, ign.com, IGNArticle, IGNVideo, IHeartRadio, iheartradio:podcast, imdb, imdb:list, Imgur, imgur:album, imgur:gallery, Ina, Inc, IndavideoEmbed, InfoQ, Instagram, instagram:tag, instagram:user, Internazionale, InternetVideoArchive, IPrima, iqiyi, Ir90Tv, ITTF, ITV, ITVBTCC, ivi, ivi:compilation, ivideon, Iwara, Izlesene, Jamendo, JamendoAlbum, JeuxVideo, Joj, Jove, JWPlatform, Kakao, Kaltura, Kankan, Karaoketv, KarriereVideos, Katsomo, KeezMovies, Ketnet, khanacademy, khanacademy:unit, KickStarter, KinjaEmbed, KinoPoisk, KonserthusetPlay, KrasView, Ku6, KUSI, kuwo:album, kuwo:category, kuwo:chart, kuwo:mv, kuwo:singer, kuwo:song, la7.it, laola1tv, laola1tv:embed, lbry, lbry:channel, LCI, Lcp, LcpPlay, Le, Lecture2Go, Lecturio, LecturioCourse, LecturioDeCourse, LEGO, Lemonde, Lenta, LePlaylist, LetvCloud, Libsyn, life, life:embed, limelight, limelight:channel, limelight:channel_list, LineTV, linkedin:learning, linkedin:learning:course, LinuxAcademy, LiTV, LiveJournal, LiveLeak, LiveLeakEmbed, livestream, livestream:original, livestream:shortener, LnkGo, loc, LocalNews8, LoveHomePorn, lrt.lt, lynda, lynda:course, m6, mailru, mailru:music, mailru:music:search, MallTV, mangomolo:live, mangomolo:video, ManyVids, Markiza, MarkizaPage, massengeschmack.tv, MatchTV, MDR, MedalTV, media.ccc.de, media.ccc.de:lists, Medialaan, Mediaset, Mediasite, MediasiteCatalog, MediasiteNamedCatalog, Medici, megaphone.fm, Meipai, MelonVOD, META, metacafe, Metacritic, mewatch, Mgoon, MGTV, MiaoPai, minds, minds:channel, minds:group, MinistryGrid, Minoto, miomio.tv, MiTele, mixcloud, mixcloud:playlist, mixcloud:user, MLB, Mms, Mnet, MNetTV, MoeVideo, Mofosex, MofosexEmbed, Mojvideo, Morningstar, Motherless, MotherlessGroup, Motorsport, MovieClips, MovieFap, Moviezine, MovingImage, MSN, mtg, mtv, mtv.de, mtv:video, mtvjapan, mtvservices:embedded, MTVUutisetArticle, MuenchenTV, mva, mva:course, Mwave, MwaveMeetGreet, MyChannels, MySpace, MySpace:album, MySpass, Myvi, MyVidster, MyviEmbed, MyVisionTV, n-tv.de, natgeo:video, NationalGeographicTV, Naver, NBA, nba:watch, nba:watch:collection, NBAChannel, NBAEmbed, NBAWatchEmbed, NBC, NBCNews, nbcolympics, nbcolympics:stream, NBCSports, NBCSportsStream, NBCSportsVPlayer, ndr, ndr:embed, ndr:embed:base, NDTV, NerdCubedFeed, netease:album, netease:djradio, netease:mv, netease:playlist, netease:program, netease:singer, netease:song, NetPlus, Netzkino, Newgrounds, NewgroundsPlaylist, Newstube, NextMedia, NextMediaActionNews, NextTV, Nexx, NexxEmbed, nfl.com (CURRENTLY BROKEN), nfl.com:article (CURRENTLY BROKEN), NhkVod, NhkVodProgram, nhl.com, nick.com, nick.de, nickelodeon:br, nickelodeonru, nicknight, niconico, NiconicoPlaylist, Nintendo, njoy, njoy:embed, NJPWWorld, NobelPrize, NonkTube, Noovo, Normalboots, NosVideo, Nova, NovaEmbed, nowness, nowness:playlist, nowness:series, Noz, npo, npo.nl:live, npo.nl:radio, npo.nl:radio:fragment, Npr, NRK, NRKPlaylist, NRKRadioPodkast, NRKSkole, NRKTV, NRKTVDirekte, NRKTVEpisode, NRKTVEpisodes, NRKTVSeason, NRKTVSeries, NRLTV, ntv.ru, Nuvid, NYTimes, NYTimesArticle, NYTimesCooking, NZZ, ocw.mit.edu, OdaTV, Odnoklassniki, OktoberfestTV, OnDemandKorea, onet.pl, onet.tv, onet.tv:channel, OnetMVP, OnionStudios, Ooyala, OoyalaExternal, OraTV, orf:burgenland, orf:fm4, orf:fm4:story, orf:iptv, orf:kaernten, orf:noe, orf:oberoesterreich, orf:oe1, orf:oe3, orf:salzburg, orf:steiermark, orf:tirol, orf:tvthek, orf:vorarlberg, orf:wien, OsnatelTV, OutsideTV, PacktPub, PacktPubCourse, pandora.tv, ParamountNetwork, parliamentlive.tv, Patreon, pbs, PearVideo, PeerTube, People, PerformGroup, periscope, periscope:user, PhilharmonieDeParis, phoenix.de, Photobucket, Picarto, PicartoVod, Piksel, Pinkbike, Pinterest, PinterestCollection, Pladform, Platzi, PlatziCourse, play.fm, player.sky.it, PlayPlusTV, PlaysTV, Playtvak, Playvid, Playwire, pluralsight, pluralsight:course, podomatic, Pokemon, PolskieRadio, PolskieRadioCategory, Popcorntimes, PopcornTV, PornCom, PornerBros, PornHd, PornHub, PornHubPagedVideoList, PornHubUser, PornHubUserVideosUpload, Pornotube, PornoVoisines, PornoXO, PornTube, PressTV, prosiebensat1, puhutv, puhutv:serie, Puls4, Pyvideo, qqmusic, qqmusic:album, qqmusic:playlist, qqmusic:singer, qqmusic:toplist, QuantumTV, Qub, Quickline, QuicklineLive, R7, R7Article, radio.de, radiobremen, radiocanada, radiocanada:audiovideo, radiofrance, RadioJavan, Rai, RaiPlay, RaiPlayLive, RaiPlayPlaylist, RayWenderlich, RayWenderlichCourse, RBMARadio, RDS, RedBull, RedBullEmbed, RedBullTV, RedBullTVRrnContent, Reddit, RedditR, RedTube, RegioTV, RENTV, RENTVArticle, Restudy, Reuters, ReverbNation, RICE, RMCDecouverte, RockstarGames, RoosterTeeth, RottenTomatoes, Roxwel, Rozhlas, RTBF, rte, rte:radio, rtl.nl, rtl2, rtl2:you, rtl2:you:series, Rtmp, RTP, RTS, rtve.es:alacarta, rtve.es:infantil, rtve.es:live, rtve.es:television, RTVNH, RTVS, RUHD, RumbleEmbed, rutube, rutube:channel, rutube:embed, rutube:movie, rutube:person, rutube:playlist, RUTV, Ruutu, Ruv, safari, safari:api, safari:course, SAKTV, SaltTV, Sapo, savefrom.net, SBS, schooltv, screen.yahoo:search, Screencast, ScreencastOMatic, ScrippsNetworks, scrippsnetworks:watch, SCTE, SCTECourse, Seeker, SenateISVP, SendtoNews, Servus, Sexu, SeznamZpravy, SeznamZpravyArticle, Shahid, ShahidShow, Shared, ShowRoomLive, Sina, sky.it, sky:news, sky:sports, sky:sports:news, skyacademy.it, SkylineWebcams, skynewsarabia:article, skynewsarabia:video, Slideshare, SlidesLive, Slutload, Snotr, Sohu, SonyLIV, soundcloud, soundcloud:playlist, soundcloud:search, soundcloud:set, soundcloud:trackstation, soundcloud:user, SoundcloudEmbed, soundgasm, soundgasm:profile, southpark.cc.com, southpark.cc.com:español, southpark.de, southpark.nl, southparkstudios.dk, SpankBang, SpankBangPlaylist, Spankwire, Spiegel, sport.francetvinfo.fr, Sport5, SportBox, SportDeutschland, spotify, spotify:show, Spreaker, SpreakerPage, SpreakerShow, SpreakerShowPage, SpringboardPlatform, Sprout, sr:mediathek, SRGSSR, SRGSSRPlay, stanfordoc, Steam, Stitcher, StitcherShow, Streamable, streamcloud.eu, StreamCZ, StreetVoice, StretchInternet, stv:player, SunPorno, sverigesradio:episode, sverigesradio:publication, SVT, SVTPage, SVTPlay, SVTSeries, SWRMediathek, Syfy, SztvHu, t-online.de, Tagesschau, tagesschau:player, Tass, TBS, TDSLifeway, Teachable, TeachableCourse, teachertube, teachertube:user:collection, TeachingChannel, Teamcoco, TeamTreeHouse, TechTalks, techtv.mit.edu, ted, Tele13, Tele5, TeleBruxelles, Telecinco, Telegraaf, TeleMB, TeleQuebec, TeleQuebecEmission, TeleQuebecLive, TeleQuebecSquat, TeleQuebecVideo, TeleTask, Telewebion, TennisTV, TenPlay, TestURL, TF1, TFO, TheIntercept, ThePlatform, ThePlatformFeed, TheScene, TheStar, TheSun, TheWeatherChannel, ThisAmericanLife, ThisAV, ThisOldHouse, TikTok, TikTokUser (CURRENTLY BROKEN), tinypic, TMZ, TMZArticle, TNAFlix, TNAFlixNetworkEmbed, toggle, ToonGoggles, tou.tv, Toypics, ToypicsUser, TrailerAddict (CURRENTLY BROKEN), Trilulilu, Trovo, TrovoVod, TruNews, TruTV, Tube8, TubiTv, Tumblr, tunein:clip, tunein:program, tunein:shortener, tunein:station, tunein:topic, TunePk, Turbo, tv.dfb.de, TV2, tv2.hu, TV2Article, TV2DK, TV2DKBornholmPlay, TV4, TV5MondePlus, tv5unis, tv5unis:video, tv8.it, TVA, TVANouvelles, TVANouvellesArticle, TVC, TVCArticle, TVer, tvigle, tvland.com, TVN24, TVNet, TVNoe, TVNow, TVNowAnnual, TVNowNew, TVNowSeason, TVNowShow, tvp, tvp:embed, tvp:series, TVPlayer, TVPlayHome, Tweakers, TwitCasting, twitch:clips, twitch:stream, twitch:vod, TwitchCollection, TwitchVideos, TwitchVideosClips, TwitchVideosCollections, twitter, twitter:amplify, twitter:broadcast, twitter:card, udemy, udemy:course, UDNEmbed, UFCArabia, UFCTV, UKTVPlay, umg:de, UnicodeBOM, Unistra, Unity, uol.com.br, uplynk, uplynk:preplay, Urort, URPlay, USANetwork, USAToday, ustream, ustream:channel, ustudio, ustudio:embed, Varzesh3, Vbox7, VeeHD, Veoh, Vesti, Vevo, VevoPlaylist, VGTV, vh1.com, vhx:embed, Viafree, vice, vice:article, vice:show, Vidbit, Viddler, Videa, video.google:search, video.sky.it, video.sky.it:live, VideoDetective, videofy.me, videomore, videomore:season, videomore:video, VideoPress, Vidio, VidLii, vidme, vidme:user, vidme:user:likes, vier, vier:videos, viewlift, viewlift:embed, Viidea, viki, viki:channel, vimeo, vimeo:album, vimeo:channel, vimeo:group, vimeo:likes, vimeo:ondemand, vimeo:review, vimeo:user, vimeo:watchlater, Vimple, Vine, vine:user, Viqeo, Viu, viu:ott, viu:playlist, Vivo, vk, vk:uservideos, vk:wallpost, vlive, vlive:channel, vlive:post, Vodlocker, VODPl, VODPlatform, VoiceRepublic, Voot, VoxMedia, VoxMediaVolume, vpro, Vrak, VRT, VrtNU, vrv, vrv:series, VShare, VTM, VTXTV, vube, VuClip, VVVVID, VVVVIDShow, VyboryMos, Vzaar, Wakanim, Walla, WalyTV, washingtonpost, washingtonpost:article, wat.tv, WatchBox, WatchIndianPorn, WDR, wdr:mobile, WDRElefant, WDRPage, Webcaster, WebcasterFeed, WebOfStories, WebOfStoriesPlaylist, Weibo, WeiboMobile, WeiqiTV, Wistia, WistiaPlaylist, wnl, WorldStarHipHop, WSJ, WSJArticle, WWE, XBef, XboxClips, XFileShare, XHamster, XHamsterEmbed, XHamsterUser, xiami:album, xiami:artist, xiami:collection, xiami:song, ximalaya, ximalaya:album, XMinus, XNXX, Xstream, XTube, XTubeUser, Xuite, XVideos, XXXYMovies, Yahoo, yahoo:gyao, yahoo:gyao:player, yahoo:japannews, YandexDisk, yandexmusic:album, yandexmusic:artist:albums, yandexmusic:artist:tracks, yandexmusic:playlist, yandexmusic:track, YandexVideo, YapFiles, YesJapan, yinyuetai:video, Ynet, YouJizz, youku, youku:show, YouNowChannel, YouNowLive, YouNowMoment, YouPorn, YourPorn, YourUpload, youtube, youtube:favorites, youtube:history, youtube:playlist, youtube:recommended, youtube:search, youtube:search:date, youtube:subscriptions, youtube:tab, youtube:truncated_id, youtube:truncated_url, youtube:watchlater, YoutubeYtBe, YoutubeYtUser, Zapiks, Zattoo, ZattooLive, ZDF, ZDFChannel, zingmp3, Zype

There are three methods to install youtube-dl on Ubuntu. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install youtube-dl Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install youtube-dl using apt-get by running the following command:

sudo apt-get -y install youtube-dl

Install youtube-dl Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install youtube-dl using apt by running the following command:

sudo apt -y install youtube-dl

Install youtube-dl Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install youtube-dl using aptitude by running the following command:

sudo aptitude -y install youtube-dl

How To Uninstall youtube-dl on Ubuntu

To uninstall only the youtube-dl package we can use the following command:

sudo apt-get remove youtube-dl

Uninstall youtube-dl And Its Dependencies

To uninstall youtube-dl and its dependencies that are no longer needed by Ubuntu, we can use the command below:

sudo apt-get -y autoremove youtube-dl

Remove youtube-dl Configurations and Data

To remove youtube-dl configuration and data from Ubuntu we can use the following command:

sudo apt-get -y purge youtube-dl

Remove youtube-dl configuration, data, and all of its dependencies

We can use the following command to remove youtube-dl configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge youtube-dl

Dependencies

youtube-dl have the following dependencies:

References

Summary

In this tutorial we learn how to install youtube-dl package on Ubuntu using different package management tools: apt, apt-get and aptitude.

Follow us

We provides various tutorials about Ubuntu