Apt-get stuck at 0% [Working]apt-get update issueHow can I get apt to use a mirror close to me, or choose a...

"Starve to death" Vs. "Starve to the point of death"

Taking headphones when quitting job

In harmony: key or the flow?

How do you get out of your own psychology to write characters?

What is the wife of a henpecked husband called?

A fantasy book with seven white haired women on the cover

What makes papers publishable in top-tier journals?

What is the industry term for house wiring diagrams?

How does Leonard in "Memento" remember reading and writing?

Why is it that Bernie Sanders is always called a "socialist"?

Which RAF squadrons and aircraft types took part in the bombing of Berlin on the 25th of August 1940?

Can the "Friends" spell be used without making the target hostile?

Why zero tolerance on nudity in space?

Crack the bank account's password!

How do I prevent a homebrew Grappling Hook feature from trivializing Tomb of Annihilation?

Subsurf on a crown. How can I smooth some edges and keep others sharp?

Can we "borrow" our answers to populate our own websites?

How can I play a serial killer in a party of good PCs?

How to not let the Identify spell spoil everything?

Does the US government have any planning in place to ensure there's no shortages of food, fuel, steel and other commodities?

Why avoid shared user accounts?

How do you funnel food off a cutting board?

Methods for writing a code review

Does an Eldritch Knight's Weapon Bond protect him from losing his weapon to a Telekinesis spell?



Apt-get stuck at 0% [Working]


apt-get update issueHow can I get apt to use a mirror close to me, or choose a faster mirror?apt-get stuck at 0 [Connecting to us.archive.ubuntu.com]How do I remount a filesystem as read/write?Got NODATA issue: 'NODATA' (does the network require authentication?)sudo apt-get is stuck at 0%Fails to download respository Information check internet connectionapt-get not workingproblems with apt-get installapt-get stuck at 0 [Connecting to us.archive.ubuntu.com]apt-get stuck on 'Setting up blueman'Broken apt-get upgradeapt-get totally not working Ubuntu 14.04 LTSWhenever I try to do sudo apt-get install I get stuck in logging inUbuntu 16 apt get update very slow / not workingsudo apt-get update stuck at 0% [Working]apt-get, curl, wget fail but ping works ubuntu server













15















When I try to do anything with apt-get using a terminal, the apt-get gets stuck at 0% [Working].










share|improve this question

























  • what about aptitude ?? aptitude install firefox

    – Rahul V Sharma
    Jul 16 '14 at 9:40











  • Aptitude is working, I quess. I opened it and it was working fine. I have never used it..

    – Digital
    Jul 16 '14 at 10:15













  • I tried aptitude install and it (after few things) got stuck too.

    – Digital
    Jul 16 '14 at 10:57






  • 1





    What is the result of ping -c 3 google.com?

    – pmichna
    Jul 16 '14 at 11:25






  • 1





    my apt-get would get stuck whenever it tried to connect to an IPv6 address....this SE answer fixed it: askubuntu.com/a/575130/421665

    – Eric
    Sep 27 '16 at 7:47
















15















When I try to do anything with apt-get using a terminal, the apt-get gets stuck at 0% [Working].










share|improve this question

























  • what about aptitude ?? aptitude install firefox

    – Rahul V Sharma
    Jul 16 '14 at 9:40











  • Aptitude is working, I quess. I opened it and it was working fine. I have never used it..

    – Digital
    Jul 16 '14 at 10:15













  • I tried aptitude install and it (after few things) got stuck too.

    – Digital
    Jul 16 '14 at 10:57






  • 1





    What is the result of ping -c 3 google.com?

    – pmichna
    Jul 16 '14 at 11:25






  • 1





    my apt-get would get stuck whenever it tried to connect to an IPv6 address....this SE answer fixed it: askubuntu.com/a/575130/421665

    – Eric
    Sep 27 '16 at 7:47














15












15








15


4






When I try to do anything with apt-get using a terminal, the apt-get gets stuck at 0% [Working].










share|improve this question
















When I try to do anything with apt-get using a terminal, the apt-get gets stuck at 0% [Working].







apt






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jul 16 '14 at 9:55









Pabi

5,69433042




5,69433042










asked Jul 16 '14 at 9:37









DigitalDigital

76114




76114













  • what about aptitude ?? aptitude install firefox

    – Rahul V Sharma
    Jul 16 '14 at 9:40











  • Aptitude is working, I quess. I opened it and it was working fine. I have never used it..

    – Digital
    Jul 16 '14 at 10:15













  • I tried aptitude install and it (after few things) got stuck too.

    – Digital
    Jul 16 '14 at 10:57






  • 1





    What is the result of ping -c 3 google.com?

    – pmichna
    Jul 16 '14 at 11:25






  • 1





    my apt-get would get stuck whenever it tried to connect to an IPv6 address....this SE answer fixed it: askubuntu.com/a/575130/421665

    – Eric
    Sep 27 '16 at 7:47



















  • what about aptitude ?? aptitude install firefox

    – Rahul V Sharma
    Jul 16 '14 at 9:40











  • Aptitude is working, I quess. I opened it and it was working fine. I have never used it..

    – Digital
    Jul 16 '14 at 10:15













  • I tried aptitude install and it (after few things) got stuck too.

    – Digital
    Jul 16 '14 at 10:57






  • 1





    What is the result of ping -c 3 google.com?

    – pmichna
    Jul 16 '14 at 11:25






  • 1





    my apt-get would get stuck whenever it tried to connect to an IPv6 address....this SE answer fixed it: askubuntu.com/a/575130/421665

    – Eric
    Sep 27 '16 at 7:47

















what about aptitude ?? aptitude install firefox

– Rahul V Sharma
Jul 16 '14 at 9:40





what about aptitude ?? aptitude install firefox

– Rahul V Sharma
Jul 16 '14 at 9:40













Aptitude is working, I quess. I opened it and it was working fine. I have never used it..

– Digital
Jul 16 '14 at 10:15







Aptitude is working, I quess. I opened it and it was working fine. I have never used it..

– Digital
Jul 16 '14 at 10:15















I tried aptitude install and it (after few things) got stuck too.

– Digital
Jul 16 '14 at 10:57





I tried aptitude install and it (after few things) got stuck too.

– Digital
Jul 16 '14 at 10:57




1




1





What is the result of ping -c 3 google.com?

– pmichna
Jul 16 '14 at 11:25





What is the result of ping -c 3 google.com?

– pmichna
Jul 16 '14 at 11:25




1




1





my apt-get would get stuck whenever it tried to connect to an IPv6 address....this SE answer fixed it: askubuntu.com/a/575130/421665

– Eric
Sep 27 '16 at 7:47





my apt-get would get stuck whenever it tried to connect to an IPv6 address....this SE answer fixed it: askubuntu.com/a/575130/421665

– Eric
Sep 27 '16 at 7:47










11 Answers
11






active

oldest

votes


















21














I came to this page via a high ranked Google search but these answers didn't help me. Instead I cleared out my local repository of retrieved package files with:



apt-get clean





share|improve this answer































    17














    You can try to check the cache and to clean the cache directory.

    In the order (each step is more deep, so stop as you find a solution):





    • sudo apt-get clean (Update) on recent versions it will clear out the local repository of retrieved package files. It will be enough most of the time. It is (was) not so on earlier versions.




      It removes everything but the lock file from /var/cache/apt/archives/
      and /var/cache/apt/archives/partial/.




    • Look inside /var/lib/apt/lists/partial/ it should be empty.

      If not you can decide to empty it sudo rm /var/lib/apt/lists/partial/* eventually you may need sudo rm -f /var/lib/apt/lists/partial/*



    • sudo apt-get check




      it updates the package cache and checks for broken dependencies.




    • Shrink to a normal (not huge) number of repositories the list of /etc/apt/sources.list.

      If they are too many your system can hang in the attempt to build all the dependencies tree.

      You can create a minimal set of repositories from Ubuntu Sources List Generator site and after that you backup the
      /etc/apt/sources.list (with e.g. sudo cp -i /etc/apt/sources.list /etc/apt/sources.list.000) you can paste that instead of your present list.


    • eventually you can check if you have a source lists file with https rather than http, but apt-transport-https is not installed (see the comment).

    • try again sudo apt-get update and if it fails

    • backup your /var/lib/apt/lists directory with sudo cp -r -p -i /var/lib/apt/lists ${HOME}/temp_apt_lists and after sudo rm -R /var/lib/apt/lists/*

    • run sudo apt-get update again


    It's possible you need to clean by hand some of the following directories (you can always backup them and only after delete the files inside) :





    • /etc/apt/sources.list.d/

      File fragments for locations to fetch packages from. Configuration Item: Dir::Etc::SourceParts.


    • etc/apt/preferences.d/

      File fragments for the version preferences. Configuration Item: Dir::Etc::PreferencesParts.


    • /var/cache/apt/archives/partial/

      Storage area for package files in transit. Configuration Item: Dir::Cache::Archives (partial will be implicitly appended)


    • /var/lib/apt/lists/partial/
      Storage area for state information in transit. Configuration Item: Dir::State::Lists (partial will be implicitly appended)


    • /var/lib/apt/lists/
      Storage area for state information for each package resource specified in sources.list(5) Configuration Item: Dir::State::Lists.


    PS> If you have succeed, remember to delete the backup copy that you don't need anymore, but not the sources.list.000 it can always be useful!

    You can find additional hints in related answer as this one.



    Update

    There was an old bug because the package squid-deb-proxy-client does not clean up all its changes, solved so:




    Removing the line:

    Acquire::http::ProxyAutoDetect "/usr/share/squid-deb-proxy-client/apt-avahi-discover";




    from:
    /etc/apt/apt.conf.d/30autoproxy



    Maybe can be useful this bug thread



    More drastic remove the package if it is possible.






    share|improve this answer


























    • Hmm this looks promising, I'll try this tomorrow (Actually its today but there is a period of sleeping between it :b). I'll post results!

      – Digital
      Jul 18 '14 at 0:36











    • Have a nice night... and dream about the point number 3 (to substitute the source list/ to shrink number of sources). If the cache is cleaned usually it solves. Check always that is possible to reach your repositories. E.g. paste http://extras.ubuntu.com/ubuntu inside the browser... (or better the lines inside your /etc/apt/sources.list

      – Hastur
      Jul 18 '14 at 8:02











    • I tried every step, but those for some reason did not help. I think I'll re-install my ubuntu. Could someone tell me how can I reinstall ubuntu that has been installed as a secondary OS (With windows)? Do I have to manually delete all Ubuntu's files and then install again, or how?

      – Digital
      Jul 18 '14 at 8:35













    • ADD: Also when I break the "Working" operation using Control-C, this apperars on the terminal: pastebin.com/GgJ2R3Ph . Do you find any answers from there?

      – Digital
      Jul 18 '14 at 8:44






    • 1





      I had the problem, that one of the hosts in sources.list was using https rather than http, but apt-transport-https was not installed.

      – cimnine
      Jun 20 '17 at 13:40





















    5














    I also found this happening to me when I switched to some https repos. apt needs apt-transport-https to be installed in order to work (which understandably can be a problem when you're trying to download some stuff).






    share|improve this answer































      3














      Make sure you can ping out of your own network and more importantly to the Ubuntu network i.e.



       ping us.archive.ubuntu.com
      OR
      ping security.ubuntu.com


      You should get an output similar to:



       PING security.ubuntu.com (91.189.88.161) 56(84) bytes of data.
      64 bytes from keeton.canonical.com (91.189.88.161): icmp_seq=1 ttl=52 time=127 ms
      64 bytes from keeton.canonical.com (91.189.88.161): icmp_seq=2 ttl=52 time=128 ms

      --- security.ubuntu.com ping statistics ---
      2 packets transmitted, 2 received, 0% packet loss, time 1000ms
      rtt min/avg/max/mdev = 127.325/127.952/128.579/0.627 ms





      share|improve this answer































        2














        first try to update it by



        aptitude update


        and then run apt-get



        or should change your mirror to closest to your place, watch this - How can I get apt to use a mirror close to me, or choose a faster mirror?






        share|improve this answer


























        • I did sudo aptitude update and now I am once again stuck at 0% [Working]

          – Digital
          Jul 16 '14 at 10:44













        • I also tried changing the mirror but I do not see any changes.

          – Digital
          Jul 16 '14 at 10:56






        • 1





          You met with strange issue ...i researched on it ... But no result

          – Rahul V Sharma
          Jul 16 '14 at 11:48



















        2














        This could also be caused by being behind a proxy that blocks access. Sometimes I got a NODATA error... sometimes it just stayed at 0% [Working...].






        share|improve this answer































          2














          if you changed location, change your download server as well:



          sudo software-properties-gtk


          click other then select best server:



          select best server 1select best server 2



          after that select and delete all other software repositories:



           delete all other software repositories



          finally:



          sudo apt-get update
          sudo apt-get upgrade





          share|improve this answer

































            0














            In debian 9, my apt was stuck at 0%[working] for sometime before it does any task which requires access to internet.
            After trying many other methods, When i disabled the network manager and started using systemd-networkd instead, this problem was finally solved.






            share|improve this answer































              0














              An answer I did not find on the internet anywhere but actually found it based on a command I executed a couple of hours ago. An example of such a command is



              echo "deb http://dl.bintray.com/tproenca/pmsarm7 jessie main" | sudo tee /etc/apt/sources.list.d/pms.list


              After which a file is added to /etc/apt/sources.list.d/. In this directory, sources could also be added. In my case it was teamviewer which contained it's own list which had an invalid url.
              Therefore causing my update to fail.
              These are the commands that I executed.



              Note: teamviewer.list was causing me problems but it can be anything for you inside this directory. Try it out and make back-ups!)



              cd /etc/apt/
              cp sources.list.d/* sources.list.d.backup/
              rm sources.list.d/teamviewer.list
              apt-get clean
              apt-get check
              apt-get update


              Hope this saves someone the hours it could have saved me!






              share|improve this answer

































                0














                I have got the same problem, but I solved it like this:



                sudo systemctl restart networking


                hope this can help.






                share|improve this answer

































                  0














                  This problem can also be caused by having a read-only file system.



                  You can check this using the following command:



                  mount | grep "on / "


                  If the output contains ro as one of the mount flags, your root file system is in read-only mode. You will have to remount your file system read-write before apt-get update will continue.



                  Resources on how to remount your file system:




                  • https://linux.die.net/man/8/mount

                  • How do I remount a filesystem as read/write?





                  share








                  New contributor




                  Gijs de Jong is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.




















                    Your Answer








                    StackExchange.ready(function() {
                    var channelOptions = {
                    tags: "".split(" "),
                    id: "89"
                    };
                    initTagRenderer("".split(" "), "".split(" "), channelOptions);

                    StackExchange.using("externalEditor", function() {
                    // Have to fire editor after snippets, if snippets enabled
                    if (StackExchange.settings.snippets.snippetsEnabled) {
                    StackExchange.using("snippets", function() {
                    createEditor();
                    });
                    }
                    else {
                    createEditor();
                    }
                    });

                    function createEditor() {
                    StackExchange.prepareEditor({
                    heartbeatType: 'answer',
                    autoActivateHeartbeat: false,
                    convertImagesToLinks: true,
                    noModals: true,
                    showLowRepImageUploadWarning: true,
                    reputationToPostImages: 10,
                    bindNavPrevention: true,
                    postfix: "",
                    imageUploader: {
                    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
                    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
                    allowUrls: true
                    },
                    onDemand: true,
                    discardSelector: ".discard-answer"
                    ,immediatelyShowMarkdownHelp:true
                    });


                    }
                    });














                    draft saved

                    draft discarded


















                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f498462%2fapt-get-stuck-at-0-working%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown

























                    11 Answers
                    11






                    active

                    oldest

                    votes








                    11 Answers
                    11






                    active

                    oldest

                    votes









                    active

                    oldest

                    votes






                    active

                    oldest

                    votes









                    21














                    I came to this page via a high ranked Google search but these answers didn't help me. Instead I cleared out my local repository of retrieved package files with:



                    apt-get clean





                    share|improve this answer




























                      21














                      I came to this page via a high ranked Google search but these answers didn't help me. Instead I cleared out my local repository of retrieved package files with:



                      apt-get clean





                      share|improve this answer


























                        21












                        21








                        21







                        I came to this page via a high ranked Google search but these answers didn't help me. Instead I cleared out my local repository of retrieved package files with:



                        apt-get clean





                        share|improve this answer













                        I came to this page via a high ranked Google search but these answers didn't help me. Instead I cleared out my local repository of retrieved package files with:



                        apt-get clean






                        share|improve this answer












                        share|improve this answer



                        share|improve this answer










                        answered Dec 30 '15 at 11:10









                        hexnethexnet

                        31124




                        31124

























                            17














                            You can try to check the cache and to clean the cache directory.

                            In the order (each step is more deep, so stop as you find a solution):





                            • sudo apt-get clean (Update) on recent versions it will clear out the local repository of retrieved package files. It will be enough most of the time. It is (was) not so on earlier versions.




                              It removes everything but the lock file from /var/cache/apt/archives/
                              and /var/cache/apt/archives/partial/.




                            • Look inside /var/lib/apt/lists/partial/ it should be empty.

                              If not you can decide to empty it sudo rm /var/lib/apt/lists/partial/* eventually you may need sudo rm -f /var/lib/apt/lists/partial/*



                            • sudo apt-get check




                              it updates the package cache and checks for broken dependencies.




                            • Shrink to a normal (not huge) number of repositories the list of /etc/apt/sources.list.

                              If they are too many your system can hang in the attempt to build all the dependencies tree.

                              You can create a minimal set of repositories from Ubuntu Sources List Generator site and after that you backup the
                              /etc/apt/sources.list (with e.g. sudo cp -i /etc/apt/sources.list /etc/apt/sources.list.000) you can paste that instead of your present list.


                            • eventually you can check if you have a source lists file with https rather than http, but apt-transport-https is not installed (see the comment).

                            • try again sudo apt-get update and if it fails

                            • backup your /var/lib/apt/lists directory with sudo cp -r -p -i /var/lib/apt/lists ${HOME}/temp_apt_lists and after sudo rm -R /var/lib/apt/lists/*

                            • run sudo apt-get update again


                            It's possible you need to clean by hand some of the following directories (you can always backup them and only after delete the files inside) :





                            • /etc/apt/sources.list.d/

                              File fragments for locations to fetch packages from. Configuration Item: Dir::Etc::SourceParts.


                            • etc/apt/preferences.d/

                              File fragments for the version preferences. Configuration Item: Dir::Etc::PreferencesParts.


                            • /var/cache/apt/archives/partial/

                              Storage area for package files in transit. Configuration Item: Dir::Cache::Archives (partial will be implicitly appended)


                            • /var/lib/apt/lists/partial/
                              Storage area for state information in transit. Configuration Item: Dir::State::Lists (partial will be implicitly appended)


                            • /var/lib/apt/lists/
                              Storage area for state information for each package resource specified in sources.list(5) Configuration Item: Dir::State::Lists.


                            PS> If you have succeed, remember to delete the backup copy that you don't need anymore, but not the sources.list.000 it can always be useful!

                            You can find additional hints in related answer as this one.



                            Update

                            There was an old bug because the package squid-deb-proxy-client does not clean up all its changes, solved so:




                            Removing the line:

                            Acquire::http::ProxyAutoDetect "/usr/share/squid-deb-proxy-client/apt-avahi-discover";




                            from:
                            /etc/apt/apt.conf.d/30autoproxy



                            Maybe can be useful this bug thread



                            More drastic remove the package if it is possible.






                            share|improve this answer


























                            • Hmm this looks promising, I'll try this tomorrow (Actually its today but there is a period of sleeping between it :b). I'll post results!

                              – Digital
                              Jul 18 '14 at 0:36











                            • Have a nice night... and dream about the point number 3 (to substitute the source list/ to shrink number of sources). If the cache is cleaned usually it solves. Check always that is possible to reach your repositories. E.g. paste http://extras.ubuntu.com/ubuntu inside the browser... (or better the lines inside your /etc/apt/sources.list

                              – Hastur
                              Jul 18 '14 at 8:02











                            • I tried every step, but those for some reason did not help. I think I'll re-install my ubuntu. Could someone tell me how can I reinstall ubuntu that has been installed as a secondary OS (With windows)? Do I have to manually delete all Ubuntu's files and then install again, or how?

                              – Digital
                              Jul 18 '14 at 8:35













                            • ADD: Also when I break the "Working" operation using Control-C, this apperars on the terminal: pastebin.com/GgJ2R3Ph . Do you find any answers from there?

                              – Digital
                              Jul 18 '14 at 8:44






                            • 1





                              I had the problem, that one of the hosts in sources.list was using https rather than http, but apt-transport-https was not installed.

                              – cimnine
                              Jun 20 '17 at 13:40


















                            17














                            You can try to check the cache and to clean the cache directory.

                            In the order (each step is more deep, so stop as you find a solution):





                            • sudo apt-get clean (Update) on recent versions it will clear out the local repository of retrieved package files. It will be enough most of the time. It is (was) not so on earlier versions.




                              It removes everything but the lock file from /var/cache/apt/archives/
                              and /var/cache/apt/archives/partial/.




                            • Look inside /var/lib/apt/lists/partial/ it should be empty.

                              If not you can decide to empty it sudo rm /var/lib/apt/lists/partial/* eventually you may need sudo rm -f /var/lib/apt/lists/partial/*



                            • sudo apt-get check




                              it updates the package cache and checks for broken dependencies.




                            • Shrink to a normal (not huge) number of repositories the list of /etc/apt/sources.list.

                              If they are too many your system can hang in the attempt to build all the dependencies tree.

                              You can create a minimal set of repositories from Ubuntu Sources List Generator site and after that you backup the
                              /etc/apt/sources.list (with e.g. sudo cp -i /etc/apt/sources.list /etc/apt/sources.list.000) you can paste that instead of your present list.


                            • eventually you can check if you have a source lists file with https rather than http, but apt-transport-https is not installed (see the comment).

                            • try again sudo apt-get update and if it fails

                            • backup your /var/lib/apt/lists directory with sudo cp -r -p -i /var/lib/apt/lists ${HOME}/temp_apt_lists and after sudo rm -R /var/lib/apt/lists/*

                            • run sudo apt-get update again


                            It's possible you need to clean by hand some of the following directories (you can always backup them and only after delete the files inside) :





                            • /etc/apt/sources.list.d/

                              File fragments for locations to fetch packages from. Configuration Item: Dir::Etc::SourceParts.


                            • etc/apt/preferences.d/

                              File fragments for the version preferences. Configuration Item: Dir::Etc::PreferencesParts.


                            • /var/cache/apt/archives/partial/

                              Storage area for package files in transit. Configuration Item: Dir::Cache::Archives (partial will be implicitly appended)


                            • /var/lib/apt/lists/partial/
                              Storage area for state information in transit. Configuration Item: Dir::State::Lists (partial will be implicitly appended)


                            • /var/lib/apt/lists/
                              Storage area for state information for each package resource specified in sources.list(5) Configuration Item: Dir::State::Lists.


                            PS> If you have succeed, remember to delete the backup copy that you don't need anymore, but not the sources.list.000 it can always be useful!

                            You can find additional hints in related answer as this one.



                            Update

                            There was an old bug because the package squid-deb-proxy-client does not clean up all its changes, solved so:




                            Removing the line:

                            Acquire::http::ProxyAutoDetect "/usr/share/squid-deb-proxy-client/apt-avahi-discover";




                            from:
                            /etc/apt/apt.conf.d/30autoproxy



                            Maybe can be useful this bug thread



                            More drastic remove the package if it is possible.






                            share|improve this answer


























                            • Hmm this looks promising, I'll try this tomorrow (Actually its today but there is a period of sleeping between it :b). I'll post results!

                              – Digital
                              Jul 18 '14 at 0:36











                            • Have a nice night... and dream about the point number 3 (to substitute the source list/ to shrink number of sources). If the cache is cleaned usually it solves. Check always that is possible to reach your repositories. E.g. paste http://extras.ubuntu.com/ubuntu inside the browser... (or better the lines inside your /etc/apt/sources.list

                              – Hastur
                              Jul 18 '14 at 8:02











                            • I tried every step, but those for some reason did not help. I think I'll re-install my ubuntu. Could someone tell me how can I reinstall ubuntu that has been installed as a secondary OS (With windows)? Do I have to manually delete all Ubuntu's files and then install again, or how?

                              – Digital
                              Jul 18 '14 at 8:35













                            • ADD: Also when I break the "Working" operation using Control-C, this apperars on the terminal: pastebin.com/GgJ2R3Ph . Do you find any answers from there?

                              – Digital
                              Jul 18 '14 at 8:44






                            • 1





                              I had the problem, that one of the hosts in sources.list was using https rather than http, but apt-transport-https was not installed.

                              – cimnine
                              Jun 20 '17 at 13:40
















                            17












                            17








                            17







                            You can try to check the cache and to clean the cache directory.

                            In the order (each step is more deep, so stop as you find a solution):





                            • sudo apt-get clean (Update) on recent versions it will clear out the local repository of retrieved package files. It will be enough most of the time. It is (was) not so on earlier versions.




                              It removes everything but the lock file from /var/cache/apt/archives/
                              and /var/cache/apt/archives/partial/.




                            • Look inside /var/lib/apt/lists/partial/ it should be empty.

                              If not you can decide to empty it sudo rm /var/lib/apt/lists/partial/* eventually you may need sudo rm -f /var/lib/apt/lists/partial/*



                            • sudo apt-get check




                              it updates the package cache and checks for broken dependencies.




                            • Shrink to a normal (not huge) number of repositories the list of /etc/apt/sources.list.

                              If they are too many your system can hang in the attempt to build all the dependencies tree.

                              You can create a minimal set of repositories from Ubuntu Sources List Generator site and after that you backup the
                              /etc/apt/sources.list (with e.g. sudo cp -i /etc/apt/sources.list /etc/apt/sources.list.000) you can paste that instead of your present list.


                            • eventually you can check if you have a source lists file with https rather than http, but apt-transport-https is not installed (see the comment).

                            • try again sudo apt-get update and if it fails

                            • backup your /var/lib/apt/lists directory with sudo cp -r -p -i /var/lib/apt/lists ${HOME}/temp_apt_lists and after sudo rm -R /var/lib/apt/lists/*

                            • run sudo apt-get update again


                            It's possible you need to clean by hand some of the following directories (you can always backup them and only after delete the files inside) :





                            • /etc/apt/sources.list.d/

                              File fragments for locations to fetch packages from. Configuration Item: Dir::Etc::SourceParts.


                            • etc/apt/preferences.d/

                              File fragments for the version preferences. Configuration Item: Dir::Etc::PreferencesParts.


                            • /var/cache/apt/archives/partial/

                              Storage area for package files in transit. Configuration Item: Dir::Cache::Archives (partial will be implicitly appended)


                            • /var/lib/apt/lists/partial/
                              Storage area for state information in transit. Configuration Item: Dir::State::Lists (partial will be implicitly appended)


                            • /var/lib/apt/lists/
                              Storage area for state information for each package resource specified in sources.list(5) Configuration Item: Dir::State::Lists.


                            PS> If you have succeed, remember to delete the backup copy that you don't need anymore, but not the sources.list.000 it can always be useful!

                            You can find additional hints in related answer as this one.



                            Update

                            There was an old bug because the package squid-deb-proxy-client does not clean up all its changes, solved so:




                            Removing the line:

                            Acquire::http::ProxyAutoDetect "/usr/share/squid-deb-proxy-client/apt-avahi-discover";




                            from:
                            /etc/apt/apt.conf.d/30autoproxy



                            Maybe can be useful this bug thread



                            More drastic remove the package if it is possible.






                            share|improve this answer















                            You can try to check the cache and to clean the cache directory.

                            In the order (each step is more deep, so stop as you find a solution):





                            • sudo apt-get clean (Update) on recent versions it will clear out the local repository of retrieved package files. It will be enough most of the time. It is (was) not so on earlier versions.




                              It removes everything but the lock file from /var/cache/apt/archives/
                              and /var/cache/apt/archives/partial/.




                            • Look inside /var/lib/apt/lists/partial/ it should be empty.

                              If not you can decide to empty it sudo rm /var/lib/apt/lists/partial/* eventually you may need sudo rm -f /var/lib/apt/lists/partial/*



                            • sudo apt-get check




                              it updates the package cache and checks for broken dependencies.




                            • Shrink to a normal (not huge) number of repositories the list of /etc/apt/sources.list.

                              If they are too many your system can hang in the attempt to build all the dependencies tree.

                              You can create a minimal set of repositories from Ubuntu Sources List Generator site and after that you backup the
                              /etc/apt/sources.list (with e.g. sudo cp -i /etc/apt/sources.list /etc/apt/sources.list.000) you can paste that instead of your present list.


                            • eventually you can check if you have a source lists file with https rather than http, but apt-transport-https is not installed (see the comment).

                            • try again sudo apt-get update and if it fails

                            • backup your /var/lib/apt/lists directory with sudo cp -r -p -i /var/lib/apt/lists ${HOME}/temp_apt_lists and after sudo rm -R /var/lib/apt/lists/*

                            • run sudo apt-get update again


                            It's possible you need to clean by hand some of the following directories (you can always backup them and only after delete the files inside) :





                            • /etc/apt/sources.list.d/

                              File fragments for locations to fetch packages from. Configuration Item: Dir::Etc::SourceParts.


                            • etc/apt/preferences.d/

                              File fragments for the version preferences. Configuration Item: Dir::Etc::PreferencesParts.


                            • /var/cache/apt/archives/partial/

                              Storage area for package files in transit. Configuration Item: Dir::Cache::Archives (partial will be implicitly appended)


                            • /var/lib/apt/lists/partial/
                              Storage area for state information in transit. Configuration Item: Dir::State::Lists (partial will be implicitly appended)


                            • /var/lib/apt/lists/
                              Storage area for state information for each package resource specified in sources.list(5) Configuration Item: Dir::State::Lists.


                            PS> If you have succeed, remember to delete the backup copy that you don't need anymore, but not the sources.list.000 it can always be useful!

                            You can find additional hints in related answer as this one.



                            Update

                            There was an old bug because the package squid-deb-proxy-client does not clean up all its changes, solved so:




                            Removing the line:

                            Acquire::http::ProxyAutoDetect "/usr/share/squid-deb-proxy-client/apt-avahi-discover";




                            from:
                            /etc/apt/apt.conf.d/30autoproxy



                            Maybe can be useful this bug thread



                            More drastic remove the package if it is possible.







                            share|improve this answer














                            share|improve this answer



                            share|improve this answer








                            edited Jun 20 '17 at 18:09

























                            answered Jul 17 '14 at 9:13









                            HasturHastur

                            2,76511732




                            2,76511732













                            • Hmm this looks promising, I'll try this tomorrow (Actually its today but there is a period of sleeping between it :b). I'll post results!

                              – Digital
                              Jul 18 '14 at 0:36











                            • Have a nice night... and dream about the point number 3 (to substitute the source list/ to shrink number of sources). If the cache is cleaned usually it solves. Check always that is possible to reach your repositories. E.g. paste http://extras.ubuntu.com/ubuntu inside the browser... (or better the lines inside your /etc/apt/sources.list

                              – Hastur
                              Jul 18 '14 at 8:02











                            • I tried every step, but those for some reason did not help. I think I'll re-install my ubuntu. Could someone tell me how can I reinstall ubuntu that has been installed as a secondary OS (With windows)? Do I have to manually delete all Ubuntu's files and then install again, or how?

                              – Digital
                              Jul 18 '14 at 8:35













                            • ADD: Also when I break the "Working" operation using Control-C, this apperars on the terminal: pastebin.com/GgJ2R3Ph . Do you find any answers from there?

                              – Digital
                              Jul 18 '14 at 8:44






                            • 1





                              I had the problem, that one of the hosts in sources.list was using https rather than http, but apt-transport-https was not installed.

                              – cimnine
                              Jun 20 '17 at 13:40





















                            • Hmm this looks promising, I'll try this tomorrow (Actually its today but there is a period of sleeping between it :b). I'll post results!

                              – Digital
                              Jul 18 '14 at 0:36











                            • Have a nice night... and dream about the point number 3 (to substitute the source list/ to shrink number of sources). If the cache is cleaned usually it solves. Check always that is possible to reach your repositories. E.g. paste http://extras.ubuntu.com/ubuntu inside the browser... (or better the lines inside your /etc/apt/sources.list

                              – Hastur
                              Jul 18 '14 at 8:02











                            • I tried every step, but those for some reason did not help. I think I'll re-install my ubuntu. Could someone tell me how can I reinstall ubuntu that has been installed as a secondary OS (With windows)? Do I have to manually delete all Ubuntu's files and then install again, or how?

                              – Digital
                              Jul 18 '14 at 8:35













                            • ADD: Also when I break the "Working" operation using Control-C, this apperars on the terminal: pastebin.com/GgJ2R3Ph . Do you find any answers from there?

                              – Digital
                              Jul 18 '14 at 8:44






                            • 1





                              I had the problem, that one of the hosts in sources.list was using https rather than http, but apt-transport-https was not installed.

                              – cimnine
                              Jun 20 '17 at 13:40



















                            Hmm this looks promising, I'll try this tomorrow (Actually its today but there is a period of sleeping between it :b). I'll post results!

                            – Digital
                            Jul 18 '14 at 0:36





                            Hmm this looks promising, I'll try this tomorrow (Actually its today but there is a period of sleeping between it :b). I'll post results!

                            – Digital
                            Jul 18 '14 at 0:36













                            Have a nice night... and dream about the point number 3 (to substitute the source list/ to shrink number of sources). If the cache is cleaned usually it solves. Check always that is possible to reach your repositories. E.g. paste http://extras.ubuntu.com/ubuntu inside the browser... (or better the lines inside your /etc/apt/sources.list

                            – Hastur
                            Jul 18 '14 at 8:02





                            Have a nice night... and dream about the point number 3 (to substitute the source list/ to shrink number of sources). If the cache is cleaned usually it solves. Check always that is possible to reach your repositories. E.g. paste http://extras.ubuntu.com/ubuntu inside the browser... (or better the lines inside your /etc/apt/sources.list

                            – Hastur
                            Jul 18 '14 at 8:02













                            I tried every step, but those for some reason did not help. I think I'll re-install my ubuntu. Could someone tell me how can I reinstall ubuntu that has been installed as a secondary OS (With windows)? Do I have to manually delete all Ubuntu's files and then install again, or how?

                            – Digital
                            Jul 18 '14 at 8:35







                            I tried every step, but those for some reason did not help. I think I'll re-install my ubuntu. Could someone tell me how can I reinstall ubuntu that has been installed as a secondary OS (With windows)? Do I have to manually delete all Ubuntu's files and then install again, or how?

                            – Digital
                            Jul 18 '14 at 8:35















                            ADD: Also when I break the "Working" operation using Control-C, this apperars on the terminal: pastebin.com/GgJ2R3Ph . Do you find any answers from there?

                            – Digital
                            Jul 18 '14 at 8:44





                            ADD: Also when I break the "Working" operation using Control-C, this apperars on the terminal: pastebin.com/GgJ2R3Ph . Do you find any answers from there?

                            – Digital
                            Jul 18 '14 at 8:44




                            1




                            1





                            I had the problem, that one of the hosts in sources.list was using https rather than http, but apt-transport-https was not installed.

                            – cimnine
                            Jun 20 '17 at 13:40







                            I had the problem, that one of the hosts in sources.list was using https rather than http, but apt-transport-https was not installed.

                            – cimnine
                            Jun 20 '17 at 13:40













                            5














                            I also found this happening to me when I switched to some https repos. apt needs apt-transport-https to be installed in order to work (which understandably can be a problem when you're trying to download some stuff).






                            share|improve this answer




























                              5














                              I also found this happening to me when I switched to some https repos. apt needs apt-transport-https to be installed in order to work (which understandably can be a problem when you're trying to download some stuff).






                              share|improve this answer


























                                5












                                5








                                5







                                I also found this happening to me when I switched to some https repos. apt needs apt-transport-https to be installed in order to work (which understandably can be a problem when you're trying to download some stuff).






                                share|improve this answer













                                I also found this happening to me when I switched to some https repos. apt needs apt-transport-https to be installed in order to work (which understandably can be a problem when you're trying to download some stuff).







                                share|improve this answer












                                share|improve this answer



                                share|improve this answer










                                answered Jun 7 '17 at 15:35









                                Peter TurnerPeter Turner

                                354414




                                354414























                                    3














                                    Make sure you can ping out of your own network and more importantly to the Ubuntu network i.e.



                                     ping us.archive.ubuntu.com
                                    OR
                                    ping security.ubuntu.com


                                    You should get an output similar to:



                                     PING security.ubuntu.com (91.189.88.161) 56(84) bytes of data.
                                    64 bytes from keeton.canonical.com (91.189.88.161): icmp_seq=1 ttl=52 time=127 ms
                                    64 bytes from keeton.canonical.com (91.189.88.161): icmp_seq=2 ttl=52 time=128 ms

                                    --- security.ubuntu.com ping statistics ---
                                    2 packets transmitted, 2 received, 0% packet loss, time 1000ms
                                    rtt min/avg/max/mdev = 127.325/127.952/128.579/0.627 ms





                                    share|improve this answer




























                                      3














                                      Make sure you can ping out of your own network and more importantly to the Ubuntu network i.e.



                                       ping us.archive.ubuntu.com
                                      OR
                                      ping security.ubuntu.com


                                      You should get an output similar to:



                                       PING security.ubuntu.com (91.189.88.161) 56(84) bytes of data.
                                      64 bytes from keeton.canonical.com (91.189.88.161): icmp_seq=1 ttl=52 time=127 ms
                                      64 bytes from keeton.canonical.com (91.189.88.161): icmp_seq=2 ttl=52 time=128 ms

                                      --- security.ubuntu.com ping statistics ---
                                      2 packets transmitted, 2 received, 0% packet loss, time 1000ms
                                      rtt min/avg/max/mdev = 127.325/127.952/128.579/0.627 ms





                                      share|improve this answer


























                                        3












                                        3








                                        3







                                        Make sure you can ping out of your own network and more importantly to the Ubuntu network i.e.



                                         ping us.archive.ubuntu.com
                                        OR
                                        ping security.ubuntu.com


                                        You should get an output similar to:



                                         PING security.ubuntu.com (91.189.88.161) 56(84) bytes of data.
                                        64 bytes from keeton.canonical.com (91.189.88.161): icmp_seq=1 ttl=52 time=127 ms
                                        64 bytes from keeton.canonical.com (91.189.88.161): icmp_seq=2 ttl=52 time=128 ms

                                        --- security.ubuntu.com ping statistics ---
                                        2 packets transmitted, 2 received, 0% packet loss, time 1000ms
                                        rtt min/avg/max/mdev = 127.325/127.952/128.579/0.627 ms





                                        share|improve this answer













                                        Make sure you can ping out of your own network and more importantly to the Ubuntu network i.e.



                                         ping us.archive.ubuntu.com
                                        OR
                                        ping security.ubuntu.com


                                        You should get an output similar to:



                                         PING security.ubuntu.com (91.189.88.161) 56(84) bytes of data.
                                        64 bytes from keeton.canonical.com (91.189.88.161): icmp_seq=1 ttl=52 time=127 ms
                                        64 bytes from keeton.canonical.com (91.189.88.161): icmp_seq=2 ttl=52 time=128 ms

                                        --- security.ubuntu.com ping statistics ---
                                        2 packets transmitted, 2 received, 0% packet loss, time 1000ms
                                        rtt min/avg/max/mdev = 127.325/127.952/128.579/0.627 ms






                                        share|improve this answer












                                        share|improve this answer



                                        share|improve this answer










                                        answered May 29 '16 at 18:49









                                        toystorytoystory

                                        5961412




                                        5961412























                                            2














                                            first try to update it by



                                            aptitude update


                                            and then run apt-get



                                            or should change your mirror to closest to your place, watch this - How can I get apt to use a mirror close to me, or choose a faster mirror?






                                            share|improve this answer


























                                            • I did sudo aptitude update and now I am once again stuck at 0% [Working]

                                              – Digital
                                              Jul 16 '14 at 10:44













                                            • I also tried changing the mirror but I do not see any changes.

                                              – Digital
                                              Jul 16 '14 at 10:56






                                            • 1





                                              You met with strange issue ...i researched on it ... But no result

                                              – Rahul V Sharma
                                              Jul 16 '14 at 11:48
















                                            2














                                            first try to update it by



                                            aptitude update


                                            and then run apt-get



                                            or should change your mirror to closest to your place, watch this - How can I get apt to use a mirror close to me, or choose a faster mirror?






                                            share|improve this answer


























                                            • I did sudo aptitude update and now I am once again stuck at 0% [Working]

                                              – Digital
                                              Jul 16 '14 at 10:44













                                            • I also tried changing the mirror but I do not see any changes.

                                              – Digital
                                              Jul 16 '14 at 10:56






                                            • 1





                                              You met with strange issue ...i researched on it ... But no result

                                              – Rahul V Sharma
                                              Jul 16 '14 at 11:48














                                            2












                                            2








                                            2







                                            first try to update it by



                                            aptitude update


                                            and then run apt-get



                                            or should change your mirror to closest to your place, watch this - How can I get apt to use a mirror close to me, or choose a faster mirror?






                                            share|improve this answer















                                            first try to update it by



                                            aptitude update


                                            and then run apt-get



                                            or should change your mirror to closest to your place, watch this - How can I get apt to use a mirror close to me, or choose a faster mirror?







                                            share|improve this answer














                                            share|improve this answer



                                            share|improve this answer








                                            edited Apr 13 '17 at 12:24









                                            Community

                                            1




                                            1










                                            answered Jul 16 '14 at 10:22









                                            Rahul V SharmaRahul V Sharma

                                            3961210




                                            3961210













                                            • I did sudo aptitude update and now I am once again stuck at 0% [Working]

                                              – Digital
                                              Jul 16 '14 at 10:44













                                            • I also tried changing the mirror but I do not see any changes.

                                              – Digital
                                              Jul 16 '14 at 10:56






                                            • 1





                                              You met with strange issue ...i researched on it ... But no result

                                              – Rahul V Sharma
                                              Jul 16 '14 at 11:48



















                                            • I did sudo aptitude update and now I am once again stuck at 0% [Working]

                                              – Digital
                                              Jul 16 '14 at 10:44













                                            • I also tried changing the mirror but I do not see any changes.

                                              – Digital
                                              Jul 16 '14 at 10:56






                                            • 1





                                              You met with strange issue ...i researched on it ... But no result

                                              – Rahul V Sharma
                                              Jul 16 '14 at 11:48

















                                            I did sudo aptitude update and now I am once again stuck at 0% [Working]

                                            – Digital
                                            Jul 16 '14 at 10:44







                                            I did sudo aptitude update and now I am once again stuck at 0% [Working]

                                            – Digital
                                            Jul 16 '14 at 10:44















                                            I also tried changing the mirror but I do not see any changes.

                                            – Digital
                                            Jul 16 '14 at 10:56





                                            I also tried changing the mirror but I do not see any changes.

                                            – Digital
                                            Jul 16 '14 at 10:56




                                            1




                                            1





                                            You met with strange issue ...i researched on it ... But no result

                                            – Rahul V Sharma
                                            Jul 16 '14 at 11:48





                                            You met with strange issue ...i researched on it ... But no result

                                            – Rahul V Sharma
                                            Jul 16 '14 at 11:48











                                            2














                                            This could also be caused by being behind a proxy that blocks access. Sometimes I got a NODATA error... sometimes it just stayed at 0% [Working...].






                                            share|improve this answer




























                                              2














                                              This could also be caused by being behind a proxy that blocks access. Sometimes I got a NODATA error... sometimes it just stayed at 0% [Working...].






                                              share|improve this answer


























                                                2












                                                2








                                                2







                                                This could also be caused by being behind a proxy that blocks access. Sometimes I got a NODATA error... sometimes it just stayed at 0% [Working...].






                                                share|improve this answer













                                                This could also be caused by being behind a proxy that blocks access. Sometimes I got a NODATA error... sometimes it just stayed at 0% [Working...].







                                                share|improve this answer












                                                share|improve this answer



                                                share|improve this answer










                                                answered Oct 30 '16 at 19:58









                                                KeithKeith

                                                23528




                                                23528























                                                    2














                                                    if you changed location, change your download server as well:



                                                    sudo software-properties-gtk


                                                    click other then select best server:



                                                    select best server 1select best server 2



                                                    after that select and delete all other software repositories:



                                                     delete all other software repositories



                                                    finally:



                                                    sudo apt-get update
                                                    sudo apt-get upgrade





                                                    share|improve this answer






























                                                      2














                                                      if you changed location, change your download server as well:



                                                      sudo software-properties-gtk


                                                      click other then select best server:



                                                      select best server 1select best server 2



                                                      after that select and delete all other software repositories:



                                                       delete all other software repositories



                                                      finally:



                                                      sudo apt-get update
                                                      sudo apt-get upgrade





                                                      share|improve this answer




























                                                        2












                                                        2








                                                        2







                                                        if you changed location, change your download server as well:



                                                        sudo software-properties-gtk


                                                        click other then select best server:



                                                        select best server 1select best server 2



                                                        after that select and delete all other software repositories:



                                                         delete all other software repositories



                                                        finally:



                                                        sudo apt-get update
                                                        sudo apt-get upgrade





                                                        share|improve this answer















                                                        if you changed location, change your download server as well:



                                                        sudo software-properties-gtk


                                                        click other then select best server:



                                                        select best server 1select best server 2



                                                        after that select and delete all other software repositories:



                                                         delete all other software repositories



                                                        finally:



                                                        sudo apt-get update
                                                        sudo apt-get upgrade






                                                        share|improve this answer














                                                        share|improve this answer



                                                        share|improve this answer








                                                        edited Mar 21 '18 at 9:37









                                                        hg8

                                                        9,824125491




                                                        9,824125491










                                                        answered Feb 7 '18 at 11:17









                                                        Farid OubbatiFarid Oubbati

                                                        212




                                                        212























                                                            0














                                                            In debian 9, my apt was stuck at 0%[working] for sometime before it does any task which requires access to internet.
                                                            After trying many other methods, When i disabled the network manager and started using systemd-networkd instead, this problem was finally solved.






                                                            share|improve this answer




























                                                              0














                                                              In debian 9, my apt was stuck at 0%[working] for sometime before it does any task which requires access to internet.
                                                              After trying many other methods, When i disabled the network manager and started using systemd-networkd instead, this problem was finally solved.






                                                              share|improve this answer


























                                                                0












                                                                0








                                                                0







                                                                In debian 9, my apt was stuck at 0%[working] for sometime before it does any task which requires access to internet.
                                                                After trying many other methods, When i disabled the network manager and started using systemd-networkd instead, this problem was finally solved.






                                                                share|improve this answer













                                                                In debian 9, my apt was stuck at 0%[working] for sometime before it does any task which requires access to internet.
                                                                After trying many other methods, When i disabled the network manager and started using systemd-networkd instead, this problem was finally solved.







                                                                share|improve this answer












                                                                share|improve this answer



                                                                share|improve this answer










                                                                answered Jun 30 '17 at 18:27









                                                                iinnkeiinnke

                                                                1




                                                                1























                                                                    0














                                                                    An answer I did not find on the internet anywhere but actually found it based on a command I executed a couple of hours ago. An example of such a command is



                                                                    echo "deb http://dl.bintray.com/tproenca/pmsarm7 jessie main" | sudo tee /etc/apt/sources.list.d/pms.list


                                                                    After which a file is added to /etc/apt/sources.list.d/. In this directory, sources could also be added. In my case it was teamviewer which contained it's own list which had an invalid url.
                                                                    Therefore causing my update to fail.
                                                                    These are the commands that I executed.



                                                                    Note: teamviewer.list was causing me problems but it can be anything for you inside this directory. Try it out and make back-ups!)



                                                                    cd /etc/apt/
                                                                    cp sources.list.d/* sources.list.d.backup/
                                                                    rm sources.list.d/teamviewer.list
                                                                    apt-get clean
                                                                    apt-get check
                                                                    apt-get update


                                                                    Hope this saves someone the hours it could have saved me!






                                                                    share|improve this answer






























                                                                      0














                                                                      An answer I did not find on the internet anywhere but actually found it based on a command I executed a couple of hours ago. An example of such a command is



                                                                      echo "deb http://dl.bintray.com/tproenca/pmsarm7 jessie main" | sudo tee /etc/apt/sources.list.d/pms.list


                                                                      After which a file is added to /etc/apt/sources.list.d/. In this directory, sources could also be added. In my case it was teamviewer which contained it's own list which had an invalid url.
                                                                      Therefore causing my update to fail.
                                                                      These are the commands that I executed.



                                                                      Note: teamviewer.list was causing me problems but it can be anything for you inside this directory. Try it out and make back-ups!)



                                                                      cd /etc/apt/
                                                                      cp sources.list.d/* sources.list.d.backup/
                                                                      rm sources.list.d/teamviewer.list
                                                                      apt-get clean
                                                                      apt-get check
                                                                      apt-get update


                                                                      Hope this saves someone the hours it could have saved me!






                                                                      share|improve this answer




























                                                                        0












                                                                        0








                                                                        0







                                                                        An answer I did not find on the internet anywhere but actually found it based on a command I executed a couple of hours ago. An example of such a command is



                                                                        echo "deb http://dl.bintray.com/tproenca/pmsarm7 jessie main" | sudo tee /etc/apt/sources.list.d/pms.list


                                                                        After which a file is added to /etc/apt/sources.list.d/. In this directory, sources could also be added. In my case it was teamviewer which contained it's own list which had an invalid url.
                                                                        Therefore causing my update to fail.
                                                                        These are the commands that I executed.



                                                                        Note: teamviewer.list was causing me problems but it can be anything for you inside this directory. Try it out and make back-ups!)



                                                                        cd /etc/apt/
                                                                        cp sources.list.d/* sources.list.d.backup/
                                                                        rm sources.list.d/teamviewer.list
                                                                        apt-get clean
                                                                        apt-get check
                                                                        apt-get update


                                                                        Hope this saves someone the hours it could have saved me!






                                                                        share|improve this answer















                                                                        An answer I did not find on the internet anywhere but actually found it based on a command I executed a couple of hours ago. An example of such a command is



                                                                        echo "deb http://dl.bintray.com/tproenca/pmsarm7 jessie main" | sudo tee /etc/apt/sources.list.d/pms.list


                                                                        After which a file is added to /etc/apt/sources.list.d/. In this directory, sources could also be added. In my case it was teamviewer which contained it's own list which had an invalid url.
                                                                        Therefore causing my update to fail.
                                                                        These are the commands that I executed.



                                                                        Note: teamviewer.list was causing me problems but it can be anything for you inside this directory. Try it out and make back-ups!)



                                                                        cd /etc/apt/
                                                                        cp sources.list.d/* sources.list.d.backup/
                                                                        rm sources.list.d/teamviewer.list
                                                                        apt-get clean
                                                                        apt-get check
                                                                        apt-get update


                                                                        Hope this saves someone the hours it could have saved me!







                                                                        share|improve this answer














                                                                        share|improve this answer



                                                                        share|improve this answer








                                                                        edited Apr 24 '18 at 10:28









                                                                        Fabby

                                                                        26.9k1360161




                                                                        26.9k1360161










                                                                        answered Aug 21 '17 at 21:55









                                                                        Jorrick SleijsterJorrick Sleijster

                                                                        134




                                                                        134























                                                                            0














                                                                            I have got the same problem, but I solved it like this:



                                                                            sudo systemctl restart networking


                                                                            hope this can help.






                                                                            share|improve this answer






























                                                                              0














                                                                              I have got the same problem, but I solved it like this:



                                                                              sudo systemctl restart networking


                                                                              hope this can help.






                                                                              share|improve this answer




























                                                                                0












                                                                                0








                                                                                0







                                                                                I have got the same problem, but I solved it like this:



                                                                                sudo systemctl restart networking


                                                                                hope this can help.






                                                                                share|improve this answer















                                                                                I have got the same problem, but I solved it like this:



                                                                                sudo systemctl restart networking


                                                                                hope this can help.







                                                                                share|improve this answer














                                                                                share|improve this answer



                                                                                share|improve this answer








                                                                                edited Dec 7 '18 at 6:58









                                                                                muru

                                                                                1




                                                                                1










                                                                                answered Dec 5 '18 at 2:05









                                                                                mostafa maouimostafa maoui

                                                                                1




                                                                                1























                                                                                    0














                                                                                    This problem can also be caused by having a read-only file system.



                                                                                    You can check this using the following command:



                                                                                    mount | grep "on / "


                                                                                    If the output contains ro as one of the mount flags, your root file system is in read-only mode. You will have to remount your file system read-write before apt-get update will continue.



                                                                                    Resources on how to remount your file system:




                                                                                    • https://linux.die.net/man/8/mount

                                                                                    • How do I remount a filesystem as read/write?





                                                                                    share








                                                                                    New contributor




                                                                                    Gijs de Jong is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                                                                    Check out our Code of Conduct.

























                                                                                      0














                                                                                      This problem can also be caused by having a read-only file system.



                                                                                      You can check this using the following command:



                                                                                      mount | grep "on / "


                                                                                      If the output contains ro as one of the mount flags, your root file system is in read-only mode. You will have to remount your file system read-write before apt-get update will continue.



                                                                                      Resources on how to remount your file system:




                                                                                      • https://linux.die.net/man/8/mount

                                                                                      • How do I remount a filesystem as read/write?





                                                                                      share








                                                                                      New contributor




                                                                                      Gijs de Jong is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                                                                      Check out our Code of Conduct.























                                                                                        0












                                                                                        0








                                                                                        0







                                                                                        This problem can also be caused by having a read-only file system.



                                                                                        You can check this using the following command:



                                                                                        mount | grep "on / "


                                                                                        If the output contains ro as one of the mount flags, your root file system is in read-only mode. You will have to remount your file system read-write before apt-get update will continue.



                                                                                        Resources on how to remount your file system:




                                                                                        • https://linux.die.net/man/8/mount

                                                                                        • How do I remount a filesystem as read/write?





                                                                                        share








                                                                                        New contributor




                                                                                        Gijs de Jong is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                                                                        Check out our Code of Conduct.










                                                                                        This problem can also be caused by having a read-only file system.



                                                                                        You can check this using the following command:



                                                                                        mount | grep "on / "


                                                                                        If the output contains ro as one of the mount flags, your root file system is in read-only mode. You will have to remount your file system read-write before apt-get update will continue.



                                                                                        Resources on how to remount your file system:




                                                                                        • https://linux.die.net/man/8/mount

                                                                                        • How do I remount a filesystem as read/write?






                                                                                        share








                                                                                        New contributor




                                                                                        Gijs de Jong is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                                                                        Check out our Code of Conduct.








                                                                                        share


                                                                                        share






                                                                                        New contributor




                                                                                        Gijs de Jong is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                                                                        Check out our Code of Conduct.









                                                                                        answered 3 mins ago









                                                                                        Gijs de JongGijs de Jong

                                                                                        101




                                                                                        101




                                                                                        New contributor




                                                                                        Gijs de Jong is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                                                                        Check out our Code of Conduct.





                                                                                        New contributor





                                                                                        Gijs de Jong is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                                                                        Check out our Code of Conduct.






                                                                                        Gijs de Jong is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                                                                        Check out our Code of Conduct.






























                                                                                            draft saved

                                                                                            draft discarded




















































                                                                                            Thanks for contributing an answer to Ask Ubuntu!


                                                                                            • Please be sure to answer the question. Provide details and share your research!

                                                                                            But avoid



                                                                                            • Asking for help, clarification, or responding to other answers.

                                                                                            • Making statements based on opinion; back them up with references or personal experience.


                                                                                            To learn more, see our tips on writing great answers.




                                                                                            draft saved


                                                                                            draft discarded














                                                                                            StackExchange.ready(
                                                                                            function () {
                                                                                            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f498462%2fapt-get-stuck-at-0-working%23new-answer', 'question_page');
                                                                                            }
                                                                                            );

                                                                                            Post as a guest















                                                                                            Required, but never shown





















































                                                                                            Required, but never shown














                                                                                            Required, but never shown












                                                                                            Required, but never shown







                                                                                            Required, but never shown

































                                                                                            Required, but never shown














                                                                                            Required, but never shown












                                                                                            Required, but never shown







                                                                                            Required, but never shown







                                                                                            Popular posts from this blog

                                                                                            Why do type traits not work with types in namespace scope?What are POD types in C++?Why can templates only be...

                                                                                            Will tsunami waves travel forever if there was no land?Why do tsunami waves begin with the water flowing away...

                                                                                            Simple Scan not detecting my scanner (Brother DCP-7055W)Brother MFC-L2700DW printer can print, can't...