sudo apt-get update stuck at 0% [Working]

8,204

It ended up being a problem with one of the sources. Specifically removing this line from /etc/apt/sources.list fixed it: deb [arch=amd64] https://download.docker.com/linux/ubuntu xenial stable.

After that I ran clean, autoclean and followed this guide which added the same source back in after which point it continued working.

Hopefully this will be useful if someone encounters the same problem.

Share:
8,204

Related videos on Youtube

pyromaniackeca
Author by

pyromaniackeca

Updated on September 18, 2022

Comments

  • pyromaniackeca
    pyromaniackeca over 1 year

    Running sudo apt-get update always get's stuck on 0% [Working] Here's an example log:

    ➜  ~ sudo apt-get update
    Hit:1 http://ppa.launchpad.net/alexlarsson/flatpak/ubuntu xenial 
    InRelease
    Hit:2 http://security.ubuntu.com/ubuntu xenial-security InRelease                                                                                                                                
    Hit:3 http://repo.entroware.com/ubuntu xenial InRelease                                                                                                                                          
    Ign:4 http://dl.google.com/linux/chrome/deb stable InRelease                                                                                                          
    Hit:5 http://archive.ubuntu.com/ubuntu xenial-proposed InRelease                                                                                
    Hit:6 http://gb.archive.ubuntu.com/ubuntu xenial InRelease                                                                
    Hit:7 http://ppa.launchpad.net/webupd8team/atom/ubuntu xenial 
    InRelease                             
    Hit:8 http://gb.archive.ubuntu.com/ubuntu xenial-updates InRelease                            
    Hit:9 http://gb.archive.ubuntu.com/ubuntu xenial-backports InRelease    
    Hit:10 http://dl.google.com/linux/chrome/deb stable Release
    0% [Working]                                       
    

    It tends to get stuck on the same step multiple times in a row, but tends to change which step that is.

    I've tried forcing IPv4 as well as changing to the default mirror with no success. I also can't seem to find any logs for this as tailing the /var/log/apt/term.log doesn't give me anything.

    One thing to note is that switching mirror also changed the step it got stuck at.

    • Bardyl
      Bardyl almost 6 years
      Does network works well? Did you try to ping something to see if it can reach any external server?
    • pyromaniackeca
      pyromaniackeca almost 6 years
      I've tried pinging gb.archive.ubuntu.com and security.ubuntu.com successfully. I don't thing the network is the issue. I've tried 3 different networks just to be sure.
    • Apologician
      Apologician almost 6 years
      Disable ipv6. Details of how is described in this answer
    • pyromaniackeca
      pyromaniackeca almost 6 years
      Thanks, but still no progress.
  • DJCrashdummy
    DJCrashdummy almost 6 years
    so marking this as solution resp. accepted answer would make sense!
  • Pierre.Vriens
    Pierre.Vriens over 5 years
    and what happened then?
  • User122
    User122 over 5 years
    @Pierre.Vriens it continues the process to the end and prints "AppStream cache update completed, but some metadata was ignored due to errors."
  • User122
    User122 over 5 years
    Three lines of the messages are: "W: GPG error: download.virtualbox.org/virtualbox/debian xenial InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY A2F683C52980AECF W: The repository 'download.virtualbox.org/virtualbox/debian xenial InRelease' is not signed. N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use."
  • Pithikos
    Pithikos over 4 years
    And how did you figure out which source was at fault? This answer is uninformative.
  • pyromaniackeca
    pyromaniackeca over 4 years
    @Pithikos Informed assumptions + trial and error, I guess I could have made it explicit. In any case I don't have something I'd describe as a good approach.