I was install Youtebe-dl through Ubuntu Software Center, but now my ubuntu software center is not working. So i can not able to Update and Install youtube-dl. I try following procedure for installation:-

$ sudo add-apt-repository ppa:nilarimogard/webupd8
$ sudo apt-get update
$ sudo apt-get install youtube-dl  

then following errors occurs......

madhavnikam@madhavnikam-Aspire-E5-511:~$ youtube-dl --version
madhavnikam@madhavnikam-Aspire-E5-511:~$ sudo add-apt-repository ppa:nilarimogard/webupd8
[sudo] password for madhavnikam: 
Sorry, try again.
[sudo] password for madhavnikam: 
Sorry, try again.
[sudo] password for madhavnikam: 
 The main Web Upd8 PPA maintained by: http://www.webupd8.org/

To add this PPA, simply paste this in a terminal:
sudo add-apt-repository ppa:nilarimogard/webupd8

Packages in this PPA: audacious, ap-hotspot, awn-applet-radio, awn-applet-wm, calise, cmus, dockbarx, dockbarx-themes-extra, dropbox-share, emerald, exaile, fbmessenger, gnome-subtitles, gnome-window-applets, grsync, grive, gthumb, launchpad-getkeys, mc, mdm (Mint Display Manager), minitunes, minitube, musique, notifyosdconfig, nautilus-columns, powertop, ppa-purge, rosa-media-player, fixed pulseaudio-equalizer, subtitleeditor, syncwall, umplayer, unity-reboot, wimlib, youtube-dl, xfce4-dockbarx-plugin, xournal, yad and others. Almost all packages are updated to their latest version.

For other (specialized) PPAs we maintain, see: https://launchpad.net/~webupd8team
 More info: https://launchpad.net/~nilarimogard/+archive/ubuntu/webupd8
Press [ENTER] to continue or ctrl-c to cancel adding it

gpg: keyring `/tmp/tmpl8q4d9le/secring.gpg' created
gpg: keyring `/tmp/tmpl8q4d9le/pubring.gpg' created
gpg: requesting key 4C9D234C from hkp server keyserver.ubuntu.com
gpg: /tmp/tmpl8q4d9le/trustdb.gpg: trustdb created
gpg: key 4C9D234C: public key "Launchpad webupd8" imported
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)
madhavnikam@madhavnikam-Aspire-E5-511:~$ sudo apt-get update
Ign http://in.archive.ubuntu.com trusty InRelease                              
Hit http://deb.opera.com stable InRelease                                      
Ign http://in.archive.ubuntu.com trusty-updates InRelease                      
Hit http://deb.opera.com stable/non-free i386 Packages                         
Ign http://in.archive.ubuntu.com trusty-backports InRelease                    
Hit http://in.archive.ubuntu.com trusty Release.gpg                            
Get:1 http://in.archive.ubuntu.com trusty-updates Release.gpg [933 B]          
Hit http://in.archive.ubuntu.com trusty-backports Release.gpg                  
Ign http://dl.google.com stable InRelease                                      
Ign http://security.ubuntu.com trusty-security InRelease                       
Ign http://ppa.launchpad.net trusty InRelease                                  
Hit http://in.archive.ubuntu.com trusty Release                                
Ign http://extras.ubuntu.com trusty InRelease                                  
Hit http://dl.google.com stable Release.gpg                                    
Get:2 http://security.ubuntu.com trusty-security Release.gpg [933 B]           
Ign http://dl.maxthon.com stable InRelease                                     
Get:3 http://in.archive.ubuntu.com trusty-updates Release [63.5 kB]            
Ign http://ppa.launchpad.net trusty InRelease                                  
Hit http://extras.ubuntu.com trusty Release.gpg                                
Hit http://dl.google.com stable Release                                        
Get:4 http://security.ubuntu.com trusty-security Release [63.5 kB]             
Hit http://dl.maxthon.com stable Release.gpg                                   
Hit http://ppa.launchpad.net trusty Release.gpg                                
Hit http://extras.ubuntu.com trusty Release                                    
Hit http://dl.google.com stable/main i386 Packages                             
Hit http://dl.maxthon.com stable Release                                       
Hit http://ppa.launchpad.net trusty Release.gpg                                
Hit http://extras.ubuntu.com trusty/main Sources                               
Hit http://in.archive.ubuntu.com trusty-backports Release                      
Hit http://ppa.launchpad.net trusty Release                                    
Hit http://dl.maxthon.com stable/maxthon i386 Packages                         
Get:5 http://security.ubuntu.com trusty-security/main Sources [83.6 kB]        
Ign http://deb.opera.com stable/non-free Translation-en_IN                     
Hit http://extras.ubuntu.com trusty/main i386 Packages                         
Hit http://in.archive.ubuntu.com trusty/main Sources                           
Hit http://ppa.launchpad.net trusty Release                                    
Ign http://deb.opera.com stable/non-free Translation-en                        
Hit http://in.archive.ubuntu.com trusty/restricted Sources                     
Hit http://ppa.launchpad.net trusty/main i386 Packages                         
Hit http://in.archive.ubuntu.com trusty/universe Sources                       
Hit http://ppa.launchpad.net trusty/main Translation-en                        
Hit http://in.archive.ubuntu.com trusty/multiverse Sources                     
Get:6 http://security.ubuntu.com trusty-security/restricted Sources [2,061 B]  
Hit http://ppa.launchpad.net trusty/main i386 Packages                         
Hit http://in.archive.ubuntu.com trusty/main i386 Packages                     
Get:7 http://security.ubuntu.com trusty-security/universe Sources [25.2 kB]    
Hit http://ppa.launchpad.net trusty/main Translation-en                        
Hit http://in.archive.ubuntu.com trusty/restricted i386 Packages               
Get:8 http://security.ubuntu.com trusty-security/multiverse Sources [2,333 B]  
Hit http://in.archive.ubuntu.com trusty/universe i386 Packages                 
Ign http://dl.google.com stable/main Translation-en_IN                         
Get:9 http://security.ubuntu.com trusty-security/main i386 Packages [269 kB]   
Hit http://in.archive.ubuntu.com trusty/multiverse i386 Packages               
Ign http://dl.google.com stable/main Translation-en                            
Hit http://in.archive.ubuntu.com trusty/main Translation-en                    
Ign http://extras.ubuntu.com trusty/main Translation-en_IN                     
Ign http://dl.maxthon.com stable/maxthon Translation-en_IN                     
Hit http://in.archive.ubuntu.com trusty/multiverse Translation-en              
Ign http://extras.ubuntu.com trusty/main Translation-en                        
Ign http://dl.maxthon.com stable/maxthon Translation-en                        
Hit http://in.archive.ubuntu.com trusty/restricted Translation-en              
Hit http://in.archive.ubuntu.com trusty/universe Translation-en                
Get:10 http://in.archive.ubuntu.com trusty-updates/main Sources [206 kB]       
Get:11 http://security.ubuntu.com trusty-security/restricted i386 Packages [8,846 B]
Get:12 http://security.ubuntu.com trusty-security/universe i386 Packages [107 kB]
Get:13 http://security.ubuntu.com trusty-security/multiverse i386 Packages [3,840 B]
Hit http://security.ubuntu.com trusty-security/main Translation-en             
Get:14 http://in.archive.ubuntu.com trusty-updates/restricted Sources [3,433 B]
Hit http://security.ubuntu.com trusty-security/multiverse Translation-en       
Get:15 http://in.archive.ubuntu.com trusty-updates/universe Sources [118 kB]   
Hit http://security.ubuntu.com trusty-security/restricted Translation-en       
Hit http://security.ubuntu.com trusty-security/universe Translation-en         
Get:16 http://in.archive.ubuntu.com trusty-updates/multiverse Sources [5,152 B]
Get:17 http://in.archive.ubuntu.com trusty-updates/main i386 Packages [513 kB] 
Get:18 http://in.archive.ubuntu.com trusty-updates/restricted i386 Packages [11.8 kB]
Get:19 http://in.archive.ubuntu.com trusty-updates/universe i386 Packages [283 kB]
Get:20 http://in.archive.ubuntu.com trusty-updates/multiverse i386 Packages [12.1 kB]
Hit http://in.archive.ubuntu.com trusty-updates/main Translation-en            
Hit http://in.archive.ubuntu.com trusty-updates/multiverse Translation-en      
Hit http://in.archive.ubuntu.com trusty-updates/restricted Translation-en      
Hit http://in.archive.ubuntu.com trusty-updates/universe Translation-en        
Hit http://in.archive.ubuntu.com trusty-backports/main Sources                 
Hit http://in.archive.ubuntu.com trusty-backports/restricted Sources           
Hit http://in.archive.ubuntu.com trusty-backports/universe Sources             
Hit http://in.archive.ubuntu.com trusty-backports/multiverse Sources           
Hit http://in.archive.ubuntu.com trusty-backports/main i386 Packages           
Hit http://in.archive.ubuntu.com trusty-backports/restricted i386 Packages     
Hit http://in.archive.ubuntu.com trusty-backports/universe i386 Packages       
Hit http://in.archive.ubuntu.com trusty-backports/multiverse i386 Packages     
Hit http://in.archive.ubuntu.com trusty-backports/main Translation-en          
Hit http://in.archive.ubuntu.com trusty-backports/multiverse Translation-en    
Hit http://in.archive.ubuntu.com trusty-backports/restricted Translation-en    
Hit http://in.archive.ubuntu.com trusty-backports/universe Translation-en      
Ign http://in.archive.ubuntu.com trusty/main Translation-en_IN                 
Ign http://in.archive.ubuntu.com trusty/multiverse Translation-en_IN
Ign http://in.archive.ubuntu.com trusty/restricted Translation-en_IN
Ign http://in.archive.ubuntu.com trusty/universe Translation-en_IN
Fetched 1,784 kB in 1min 29s (20.0 kB/s)
Reading package lists... Error!
E: Encountered a section with no Package: header
E: Problem with MergeList /var/lib/apt/lists/in.archive.ubuntu.com_ubuntu_dists_trusty_main_i18n_Translation-en
E: The package lists or status file could not be parsed or opened.
madhavnikam@madhavnikam-Aspire-E5-511:~$ sudo apt-get install youtube-dl
Reading package lists... Error!
E: Encountered a section with no Package: header
E: Problem with MergeList /var/lib/apt/lists/in.archive.ubuntu.com_ubuntu_dists_trusty_main_i18n_Translation-en
E: The package lists or status file could not be parsed or opened.
madhavnikam@madhavnikam-Aspire-E5-511:~$ youtube-dl -U
It looks like you installed youtube-dl with a package manager, pip, setup.py or a tarball. Please use that to update.

How can I uninstall and install Youtube-dl by using terminal only.

  • 1
    First fix the error you are encountering using this post. What version of youtube-dl are you currently using (you can use youtube-dl --version for that)? – Wilf Jun 3 '15 at 14:58
  • @Wilf thanks it working with no errors. I try below commands sudo rm /var/lib/apt/lists/* -vf sudo apt-get update what should do next? – Madhav Nikam Jun 3 '15 at 15:16
  • error occur al last W: Failed to fetch in.archive.ubuntu.com/ubuntu/dists/trusty-updates/main/i18n/… Hash Sum mismatch – Madhav Nikam Jun 3 '15 at 15:24
  • W: Failed to fetch in.archive.ubuntu.com/ubuntu/dists/trusty-updates/universe/i18n/… Hash Sum mismatch E: Some index files failed to download. They have been ignored, or old ones used instead. – Madhav Nikam Jun 3 '15 at 15:25
  • You can use the edit button to add information to your question.... are you connected to the internet via a proxy? /var/lib/apt/lists/ should be empty after running the first command – Wilf Jun 3 '15 at 16:19

Try pip command to upgrade youtube-dl

sudo pip install --upgrade youtube-dl

If you get this message:

sudo: pip: command not found

Then first install pip:

sudo apt-get install python-setuptools
sudo easy_install pip
sudo pip install --upgrade youtube-dl

I solve that problem by using commands.
(Step 1)

sudo apt-get remove youtube-dl
remove youtube-dl
After that
(step 2)
sudo apt-get install youtube-dl
install youtube-dl step (3) Downloading play-list.....
 youtube-dl -cit --extract-audio --audio-format mp3 https://www.youtube.com/playlist?list=PLttJ4RON7sleuL8wDpxbKHbSJ7BH4vvCk
downloading playlist by Youtube-dl


It would be easier to use --reinstall

sudo apt-get install --reinstall youtube-dl

then use it:

 youtube-dl -cit --extract-audio --audio-format mp3 https://www.youtube.com/playlist?list=PLttJ4RON7sleuL8wDpxbKHbSJ7BH4vvCk
  • So why the downvote? – Maythux Jun 4 '15 at 7:55

I disagree with other answers, better is the official way to install youtube-dl since very often you will need to update it (sudo youtube-dl -U) to keep it working:

sudo wget https://yt-dl.org/downloads/latest/youtube-dl -O /usr/local/bin/youtube-dl
sudo chmod a+rx /usr/local/bin/youtube-dl

And here you'll find a bash script I made for batch downloading getting track names from a text file.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.