Trouble downloading packages list due to a “Hash sum mismatch” error

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP


.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty margin-bottom:0;







up vote
331
down vote

favorite
117












When I check for updates, I get a "Failed To Download Repository Information" error.



This is what comes up under details:



W: Failed to fetch gzip:/var/lib/apt/lists/partial/us.archive.ubuntu.com_ubuntu_dists_natty_main_source_Sources Hash Sum mismatch, 
E: Some index files failed to download. They have been ignored, or old ones used instead.






share|improve this question



























    up vote
    331
    down vote

    favorite
    117












    When I check for updates, I get a "Failed To Download Repository Information" error.



    This is what comes up under details:



    W: Failed to fetch gzip:/var/lib/apt/lists/partial/us.archive.ubuntu.com_ubuntu_dists_natty_main_source_Sources Hash Sum mismatch, 
    E: Some index files failed to download. They have been ignored, or old ones used instead.






    share|improve this question























      up vote
      331
      down vote

      favorite
      117









      up vote
      331
      down vote

      favorite
      117






      117





      When I check for updates, I get a "Failed To Download Repository Information" error.



      This is what comes up under details:



      W: Failed to fetch gzip:/var/lib/apt/lists/partial/us.archive.ubuntu.com_ubuntu_dists_natty_main_source_Sources Hash Sum mismatch, 
      E: Some index files failed to download. They have been ignored, or old ones used instead.






      share|improve this question













      When I check for updates, I get a "Failed To Download Repository Information" error.



      This is what comes up under details:



      W: Failed to fetch gzip:/var/lib/apt/lists/partial/us.archive.ubuntu.com_ubuntu_dists_natty_main_source_Sources Hash Sum mismatch, 
      E: Some index files failed to download. They have been ignored, or old ones used instead.








      share|improve this question












      share|improve this question




      share|improve this question








      edited Nov 12 '14 at 23:37









      Braiam

      49.5k19130210




      49.5k19130210









      asked May 9 '11 at 20:55









      Rob

      5,300102640




      5,300102640




















          16 Answers
          16






          active

          oldest

          votes

















          up vote
          395
          down vote



          accepted










          Just remove all the content of /var/lib/apt/lists directory:



          sudo rm -rf /var/lib/apt/lists/*


          then run:



          sudo apt-get update





          share|improve this answer



















          • 58




            If you remove all files, you have to download them again. You can just remove the invalid file to make this process faster.
            – Behrang
            Jul 28 '13 at 12:51






          • 6




            I remember this happening with Debian, too. The solution was to switch repositories (eg, from us.ubuntu.com to XX.ubuntu.com where XX is your country code) or waiting. The best idea would be to wait a bit and retry later. Removing the lists might fix broken lists, but that's rarely the case.
            – f.ardelian
            Jul 31 '13 at 10:58






          • 4




            Old question, but on some distros (Like emdebian), after doing this you'll need to "mkdir /var/lib/apt/lists/partial" (As root, obviously.), or else you cannot "apt-get update" or otherwise use apt.
            – Archenoth
            Dec 26 '13 at 3:48







          • 6




            @AlyssaGono if it's a folder, you need to run rm with the recursive flag like so: sudo rm -R /var/lib/apt/lists/* however, even doing that didn't work for me.
            – mchid
            Dec 11 '14 at 3:33






          • 2




            We need prefix -rf, so it will look like sudo rm -rf /var/lib/apt/lists/*
            – Askar
            Feb 6 '15 at 0:45


















          up vote
          121
          down vote













          This is a known issue, and is exacerbated for clients behind proxy caches. Some large organisations and ISPs (especially in remote parts of the world) have transparent caches of which you may not be aware.



          The fundamental issue is that the apt repository format is subject to race conditions when a mirror is updated. This problem particularly affects repositories that change rapidly, such as the development release.



          You can track progress on the fix for this in this bug (please mark yourself as "affects me too" in the bug) and this blueprint. But be aware that it is a complex issue and may take more than one release to resolve.






          share|improve this answer

















          • 4




            That blueprint is no longer accessible; here's an archived copy.
            – Eliah Kagan
            Apr 23 '15 at 15:13






          • 10




            this bug also exists on ubuntu 16.04
            – Scott Stensland
            Mar 31 '16 at 19:34






          • 1




            The bug has been marked as "Fix Released".
            – user364819
            Apr 5 '16 at 12:17










          • I just change my mirror default to the best server and its work for me.
            – habibun
            Jul 23 '17 at 15:28

















          up vote
          77
          down vote













          The easiest way to fix this is:



          sudo apt-get clean
          sudo apt-get update





          share|improve this answer

















          • 9




            After trying the accepted answer I still had the same errors, trying this immediately afterwards fixed the issue
            – Alex
            Oct 21 '15 at 10:50






          • 15




            Doing sudo rm -rf /var/lib/apt/lists/* then sudo apto-get clean fixed the problem for me also. Neither worked in isolation.
            – Cam
            Oct 29 '15 at 23:27







          • 1




            This should be the correct answer.
            – Clayton Dukes
            Jan 11 '16 at 18:07






          • 2




            does not help on ubuntu 16.04 ... neither does the comment above help any
            – Scott Stensland
            Mar 31 '16 at 19:46






          • 1




            sudo apt-get clean did not help with 16.04, but sudo rm -rf /var/lib/apt/lists/* fixed it
            – sdaffa23fdsf
            Aug 29 '16 at 0:18

















          up vote
          42
          down vote













          I still had the problem after removing the directories and doing sudo apt-get update.

          Only the following step solved my problem:



          sudo sed -i -re 's/w+.archive.ubuntu.com/archive.ubuntu.com/g' /etc/apt/sources.list


          I don't know if this is the right way of fixing it...

          I've found the solution here.






          share|improve this answer



















          • 13




            One should note that de-part indicates a server for Germany and that this script replaces to local server with the main server. Going to Software Sources the GUI-way and switching the setting there would be safer and reversible for a lot of users. The following should work for almost every country: sudo sed -i 's/[a-z][a-z].archive.ubuntu.com/archive.ubuntu.com/g' /etc/apt/sources.list
            – LiveWireBT
            Sep 10 '14 at 19:53

















          up vote
          24
          down vote













          The only solution that worked for me is from unix.stackexchange.



          It happens because there's a known bug it apt, and the solution is to update with a different compression method, so the files load correctly and the checksum succeeds.



          Give this a try:



          sudo rm -rf /var/lib/apt/lists/partial
          sudo apt-get update -o Acquire::CompressionTypes::Order::=gz


          (thanks @brook_hong from the comments for the rm part)






          share|improve this answer



















          • 3




            This is the only solution here that worked for me. Thanks.
            – Cerin
            Jun 21 '16 at 17:53






          • 2




            It worked for me too. Note that you don't have to always run this command. Just run it once, and then you can run "apt-get update" without error.
            – dalf
            Jul 6 '16 at 1:35






          • 1




            Before try with the option, we must clean the partial folder -- sudo rm -rf /var/lib/apt/lists/partial. I wrote an article for why. brookhong.github.io/2016/10/10/…
            – brook hong
            Oct 10 '16 at 10:17







          • 1




            I tried using the generic solution from various forums but this works out of the box. Thank you.
            – wkhwilo
            May 26 at 14:41










          • Worked for me on Ubuntu 16.04/linux mint
            – David Okwii
            Jun 13 at 17:09

















          up vote
          22
          down vote













          This can happen when your mirror is not up to date or serving errors from being overloaded. You can either wait a while and try again, or switch to another mirror:



          • How can I get apt to use a mirror close to me, or choose a faster mirror?





          share|improve this answer



















          • 2




            Why does a server not being up to date, or being overloaded, cause a file with the correct name to successfully download (in the sense that the connection doesn't terminate until all the bytes are sent and received), but be corrupted? (I'm not asserting that doesn't happen, I'm just hoping you might be able to explain why it does.)
            – Eliah Kagan
            Aug 13 '12 at 21:30







          • 3




            @EliahKagan The problem normally is not that the file itself is corrupted, but that there is a (I am simplifying but not too much) data file and an index file containing the hash (fingerprint) of the data file. When the repositories are updated (happens every hour) on the server one file after the other gets updated. Now it can happen that your client (apt-get or similar) accesses the server when the data file has been updated but the index file has not been updated (or vice versa), yet. Then the hash doesn't match the data file and the client (falsely) assumes that the data file is corrupted.
            – Patrick Häcker
            Apr 14 '14 at 6:49






          • 1




            Changing the mirror worked for me when none of the above answers did.
            – mango
            Mar 25 '16 at 16:16

















          up vote
          5
          down vote













          If you're behind a proxy, then create a file named 99fixbadproxy in /etc/apt/apt.conf.d/:



          sudo gedit /etc/apt/apt.conf.d/99fixbadproxy


          Paste this into 99fixbadproxy and save it:



          Acquire::http::Pipeline-Depth 0;
          Acquire::http::No-Cache true;
          Acquire::BrokenProxy true;


          Now run the update command:



          sudo apt-get update





          share|improve this answer






























            up vote
            4
            down vote













            The following commands may solve your issue.





            sudo rm -R /var/lib/apt/lists/partial/*


            and then



            sudo apt-get update && sudo apt-get upgrade


            it will solve your problem. I also faced the same problem but the above commands solved the problem for me. So give them a try.



            Solution reference






            share|improve this answer

















            • 4




              I just tried, and it did not work; The first apt-get update created files in the same place again in that directory.
              – Volker Siegel
              Jan 23 '15 at 11:17

















            up vote
            3
            down vote













            I had the exact same problem and all solutions provided using the terminal did not help.



            For me, it was by going into:



            Settings → Software & Updates → Ubuntu Software: Download from: Change Local to Main Server.



            It starts reloading the repos and updating. When I enter:



            sudo apt-get update


            After that, there was no problem at all. I'm using Ubuntu 14.04.4 LTS.






            share|improve this answer






























              up vote
              1
              down vote













              I don't know that it's proper solution or not, but I did the following and the error message's gone:



              After typing sudo apt-get update in terminal, it gives me the names of some packages which cause the error then I did the following:



              Update manager(software update) → Setting → Configure Software Sources → Other software[tab] → Uncheck the packages



              After pressing the "close" bottom, update manager started to check for update automatically again and I saw this message:"the software on this computer is up to date. Last checked 2 seconds ago."



              Kubuntu 12.04






              share|improve this answer























              • This worked for me, and no other solution posted here worked. Except I don't have the Ubuntu UI (running command-line only under WSL), So instead, for each package <pkg> where the error occurred, I ran `sudo apt-get install <pkg>'. I am on Ubuntu 16.04.
                – Yitz
                Feb 20 at 13:29


















              up vote
              1
              down vote













              I had the exact same problem and all solutions provided using the terminal did not help.



              For me, it was by going into:



              Settings → Software & Updates → Other software: Uncheck all the boxes and press close.



              It starts reloading the repos and updating. When I enter:



              sudo apt-get update


              After that, there was no problem at all. I'm using Ubuntu 13.10.






              share|improve this answer























              • This does work yet it effectively blinds the machine from being able to install packages not part of the core build (until those checkboxes are re-activated later) ... yet necessary at times just to achieve an error free apt-get update which enables install of targeted packages
                – Scott Stensland
                Apr 6 '16 at 15:39

















              up vote
              1
              down vote













              I had a similar problem and solved it by opening theh application "Software & Updates" and, in "Ubuntu Software" tab, changing the value of "Download from" (in that drop-down list, try to select, for example, Main Server if it was not like that).






              share|improve this answer





















              • Yes, only thing that worked for me. Switzerland server seems broken.
                – Eric MORAND
                Sep 4 '17 at 14:26

















              up vote
              0
              down vote













              As follow @robie-basak, I used apt-cacher-ng as mirror caching. So I Remove the proxy and the problem solved.



              I remove the proxy in file /etc/apt/apt.conf.d/01proxy:



              #Acquire::http::Proxy "http://xxx.xx.xx.xx:4321";


              Then need to:



              sudo rm -rf /var/lib/apt/lists/*
              sudo aptitude update
              sudo aptitude upgrade





              share|improve this answer




























                up vote
                0
                down vote













                I had just recently install Ubuntu 17.10 and was getting the same error of Hash Sum Mismatch for a some repository.I went to Software and Checked Source as shown below and there were no problems further for downloading repository from the terminal.



                My Software and Update Section






                share|improve this answer




























                  up vote
                  0
                  down vote













                  This can happen if you're running a router with parental controls, and havent put your raspberry pi into an "unmanaged" list. For me, I could see the url was redirecting to a circle domain, managed by the router.



                  So I just added my pi to the unmanaged list, and it worked fine.






                  share|improve this answer




























                    up vote
                    0
                    down vote













                    I have resolved all the packages not being installed by running this command:



                    sudo apt-get install PACKAGENAME


                    For each of the packages. They are now installed and the "Hash Sum mismatch" error has gone.






                    share|improve this answer






















                      protected by Anwar May 22 '15 at 15:16



                      Thank you for your interest in this question.
                      Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).



                      Would you like to answer one of these unanswered questions instead?














                      16 Answers
                      16






                      active

                      oldest

                      votes








                      16 Answers
                      16






                      active

                      oldest

                      votes









                      active

                      oldest

                      votes






                      active

                      oldest

                      votes








                      up vote
                      395
                      down vote



                      accepted










                      Just remove all the content of /var/lib/apt/lists directory:



                      sudo rm -rf /var/lib/apt/lists/*


                      then run:



                      sudo apt-get update





                      share|improve this answer



















                      • 58




                        If you remove all files, you have to download them again. You can just remove the invalid file to make this process faster.
                        – Behrang
                        Jul 28 '13 at 12:51






                      • 6




                        I remember this happening with Debian, too. The solution was to switch repositories (eg, from us.ubuntu.com to XX.ubuntu.com where XX is your country code) or waiting. The best idea would be to wait a bit and retry later. Removing the lists might fix broken lists, but that's rarely the case.
                        – f.ardelian
                        Jul 31 '13 at 10:58






                      • 4




                        Old question, but on some distros (Like emdebian), after doing this you'll need to "mkdir /var/lib/apt/lists/partial" (As root, obviously.), or else you cannot "apt-get update" or otherwise use apt.
                        – Archenoth
                        Dec 26 '13 at 3:48







                      • 6




                        @AlyssaGono if it's a folder, you need to run rm with the recursive flag like so: sudo rm -R /var/lib/apt/lists/* however, even doing that didn't work for me.
                        – mchid
                        Dec 11 '14 at 3:33






                      • 2




                        We need prefix -rf, so it will look like sudo rm -rf /var/lib/apt/lists/*
                        – Askar
                        Feb 6 '15 at 0:45















                      up vote
                      395
                      down vote



                      accepted










                      Just remove all the content of /var/lib/apt/lists directory:



                      sudo rm -rf /var/lib/apt/lists/*


                      then run:



                      sudo apt-get update





                      share|improve this answer



















                      • 58




                        If you remove all files, you have to download them again. You can just remove the invalid file to make this process faster.
                        – Behrang
                        Jul 28 '13 at 12:51






                      • 6




                        I remember this happening with Debian, too. The solution was to switch repositories (eg, from us.ubuntu.com to XX.ubuntu.com where XX is your country code) or waiting. The best idea would be to wait a bit and retry later. Removing the lists might fix broken lists, but that's rarely the case.
                        – f.ardelian
                        Jul 31 '13 at 10:58






                      • 4




                        Old question, but on some distros (Like emdebian), after doing this you'll need to "mkdir /var/lib/apt/lists/partial" (As root, obviously.), or else you cannot "apt-get update" or otherwise use apt.
                        – Archenoth
                        Dec 26 '13 at 3:48







                      • 6




                        @AlyssaGono if it's a folder, you need to run rm with the recursive flag like so: sudo rm -R /var/lib/apt/lists/* however, even doing that didn't work for me.
                        – mchid
                        Dec 11 '14 at 3:33






                      • 2




                        We need prefix -rf, so it will look like sudo rm -rf /var/lib/apt/lists/*
                        – Askar
                        Feb 6 '15 at 0:45













                      up vote
                      395
                      down vote



                      accepted







                      up vote
                      395
                      down vote



                      accepted






                      Just remove all the content of /var/lib/apt/lists directory:



                      sudo rm -rf /var/lib/apt/lists/*


                      then run:



                      sudo apt-get update





                      share|improve this answer















                      Just remove all the content of /var/lib/apt/lists directory:



                      sudo rm -rf /var/lib/apt/lists/*


                      then run:



                      sudo apt-get update






                      share|improve this answer















                      share|improve this answer



                      share|improve this answer








                      edited Sep 17 '15 at 15:21









                      sorin

                      3,666123651




                      3,666123651











                      answered May 9 '11 at 21:52









                      Lorem

                      4,2261106




                      4,2261106







                      • 58




                        If you remove all files, you have to download them again. You can just remove the invalid file to make this process faster.
                        – Behrang
                        Jul 28 '13 at 12:51






                      • 6




                        I remember this happening with Debian, too. The solution was to switch repositories (eg, from us.ubuntu.com to XX.ubuntu.com where XX is your country code) or waiting. The best idea would be to wait a bit and retry later. Removing the lists might fix broken lists, but that's rarely the case.
                        – f.ardelian
                        Jul 31 '13 at 10:58






                      • 4




                        Old question, but on some distros (Like emdebian), after doing this you'll need to "mkdir /var/lib/apt/lists/partial" (As root, obviously.), or else you cannot "apt-get update" or otherwise use apt.
                        – Archenoth
                        Dec 26 '13 at 3:48







                      • 6




                        @AlyssaGono if it's a folder, you need to run rm with the recursive flag like so: sudo rm -R /var/lib/apt/lists/* however, even doing that didn't work for me.
                        – mchid
                        Dec 11 '14 at 3:33






                      • 2




                        We need prefix -rf, so it will look like sudo rm -rf /var/lib/apt/lists/*
                        – Askar
                        Feb 6 '15 at 0:45













                      • 58




                        If you remove all files, you have to download them again. You can just remove the invalid file to make this process faster.
                        – Behrang
                        Jul 28 '13 at 12:51






                      • 6




                        I remember this happening with Debian, too. The solution was to switch repositories (eg, from us.ubuntu.com to XX.ubuntu.com where XX is your country code) or waiting. The best idea would be to wait a bit and retry later. Removing the lists might fix broken lists, but that's rarely the case.
                        – f.ardelian
                        Jul 31 '13 at 10:58






                      • 4




                        Old question, but on some distros (Like emdebian), after doing this you'll need to "mkdir /var/lib/apt/lists/partial" (As root, obviously.), or else you cannot "apt-get update" or otherwise use apt.
                        – Archenoth
                        Dec 26 '13 at 3:48







                      • 6




                        @AlyssaGono if it's a folder, you need to run rm with the recursive flag like so: sudo rm -R /var/lib/apt/lists/* however, even doing that didn't work for me.
                        – mchid
                        Dec 11 '14 at 3:33






                      • 2




                        We need prefix -rf, so it will look like sudo rm -rf /var/lib/apt/lists/*
                        – Askar
                        Feb 6 '15 at 0:45








                      58




                      58




                      If you remove all files, you have to download them again. You can just remove the invalid file to make this process faster.
                      – Behrang
                      Jul 28 '13 at 12:51




                      If you remove all files, you have to download them again. You can just remove the invalid file to make this process faster.
                      – Behrang
                      Jul 28 '13 at 12:51




                      6




                      6




                      I remember this happening with Debian, too. The solution was to switch repositories (eg, from us.ubuntu.com to XX.ubuntu.com where XX is your country code) or waiting. The best idea would be to wait a bit and retry later. Removing the lists might fix broken lists, but that's rarely the case.
                      – f.ardelian
                      Jul 31 '13 at 10:58




                      I remember this happening with Debian, too. The solution was to switch repositories (eg, from us.ubuntu.com to XX.ubuntu.com where XX is your country code) or waiting. The best idea would be to wait a bit and retry later. Removing the lists might fix broken lists, but that's rarely the case.
                      – f.ardelian
                      Jul 31 '13 at 10:58




                      4




                      4




                      Old question, but on some distros (Like emdebian), after doing this you'll need to "mkdir /var/lib/apt/lists/partial" (As root, obviously.), or else you cannot "apt-get update" or otherwise use apt.
                      – Archenoth
                      Dec 26 '13 at 3:48





                      Old question, but on some distros (Like emdebian), after doing this you'll need to "mkdir /var/lib/apt/lists/partial" (As root, obviously.), or else you cannot "apt-get update" or otherwise use apt.
                      – Archenoth
                      Dec 26 '13 at 3:48





                      6




                      6




                      @AlyssaGono if it's a folder, you need to run rm with the recursive flag like so: sudo rm -R /var/lib/apt/lists/* however, even doing that didn't work for me.
                      – mchid
                      Dec 11 '14 at 3:33




                      @AlyssaGono if it's a folder, you need to run rm with the recursive flag like so: sudo rm -R /var/lib/apt/lists/* however, even doing that didn't work for me.
                      – mchid
                      Dec 11 '14 at 3:33




                      2




                      2




                      We need prefix -rf, so it will look like sudo rm -rf /var/lib/apt/lists/*
                      – Askar
                      Feb 6 '15 at 0:45





                      We need prefix -rf, so it will look like sudo rm -rf /var/lib/apt/lists/*
                      – Askar
                      Feb 6 '15 at 0:45













                      up vote
                      121
                      down vote













                      This is a known issue, and is exacerbated for clients behind proxy caches. Some large organisations and ISPs (especially in remote parts of the world) have transparent caches of which you may not be aware.



                      The fundamental issue is that the apt repository format is subject to race conditions when a mirror is updated. This problem particularly affects repositories that change rapidly, such as the development release.



                      You can track progress on the fix for this in this bug (please mark yourself as "affects me too" in the bug) and this blueprint. But be aware that it is a complex issue and may take more than one release to resolve.






                      share|improve this answer

















                      • 4




                        That blueprint is no longer accessible; here's an archived copy.
                        – Eliah Kagan
                        Apr 23 '15 at 15:13






                      • 10




                        this bug also exists on ubuntu 16.04
                        – Scott Stensland
                        Mar 31 '16 at 19:34






                      • 1




                        The bug has been marked as "Fix Released".
                        – user364819
                        Apr 5 '16 at 12:17










                      • I just change my mirror default to the best server and its work for me.
                        – habibun
                        Jul 23 '17 at 15:28














                      up vote
                      121
                      down vote













                      This is a known issue, and is exacerbated for clients behind proxy caches. Some large organisations and ISPs (especially in remote parts of the world) have transparent caches of which you may not be aware.



                      The fundamental issue is that the apt repository format is subject to race conditions when a mirror is updated. This problem particularly affects repositories that change rapidly, such as the development release.



                      You can track progress on the fix for this in this bug (please mark yourself as "affects me too" in the bug) and this blueprint. But be aware that it is a complex issue and may take more than one release to resolve.






                      share|improve this answer

















                      • 4




                        That blueprint is no longer accessible; here's an archived copy.
                        – Eliah Kagan
                        Apr 23 '15 at 15:13






                      • 10




                        this bug also exists on ubuntu 16.04
                        – Scott Stensland
                        Mar 31 '16 at 19:34






                      • 1




                        The bug has been marked as "Fix Released".
                        – user364819
                        Apr 5 '16 at 12:17










                      • I just change my mirror default to the best server and its work for me.
                        – habibun
                        Jul 23 '17 at 15:28












                      up vote
                      121
                      down vote










                      up vote
                      121
                      down vote









                      This is a known issue, and is exacerbated for clients behind proxy caches. Some large organisations and ISPs (especially in remote parts of the world) have transparent caches of which you may not be aware.



                      The fundamental issue is that the apt repository format is subject to race conditions when a mirror is updated. This problem particularly affects repositories that change rapidly, such as the development release.



                      You can track progress on the fix for this in this bug (please mark yourself as "affects me too" in the bug) and this blueprint. But be aware that it is a complex issue and may take more than one release to resolve.






                      share|improve this answer













                      This is a known issue, and is exacerbated for clients behind proxy caches. Some large organisations and ISPs (especially in remote parts of the world) have transparent caches of which you may not be aware.



                      The fundamental issue is that the apt repository format is subject to race conditions when a mirror is updated. This problem particularly affects repositories that change rapidly, such as the development release.



                      You can track progress on the fix for this in this bug (please mark yourself as "affects me too" in the bug) and this blueprint. But be aware that it is a complex issue and may take more than one release to resolve.







                      share|improve this answer













                      share|improve this answer



                      share|improve this answer











                      answered Jul 5 '12 at 22:21









                      Robie Basak

                      11.3k24470




                      11.3k24470







                      • 4




                        That blueprint is no longer accessible; here's an archived copy.
                        – Eliah Kagan
                        Apr 23 '15 at 15:13






                      • 10




                        this bug also exists on ubuntu 16.04
                        – Scott Stensland
                        Mar 31 '16 at 19:34






                      • 1




                        The bug has been marked as "Fix Released".
                        – user364819
                        Apr 5 '16 at 12:17










                      • I just change my mirror default to the best server and its work for me.
                        – habibun
                        Jul 23 '17 at 15:28












                      • 4




                        That blueprint is no longer accessible; here's an archived copy.
                        – Eliah Kagan
                        Apr 23 '15 at 15:13






                      • 10




                        this bug also exists on ubuntu 16.04
                        – Scott Stensland
                        Mar 31 '16 at 19:34






                      • 1




                        The bug has been marked as "Fix Released".
                        – user364819
                        Apr 5 '16 at 12:17










                      • I just change my mirror default to the best server and its work for me.
                        – habibun
                        Jul 23 '17 at 15:28







                      4




                      4




                      That blueprint is no longer accessible; here's an archived copy.
                      – Eliah Kagan
                      Apr 23 '15 at 15:13




                      That blueprint is no longer accessible; here's an archived copy.
                      – Eliah Kagan
                      Apr 23 '15 at 15:13




                      10




                      10




                      this bug also exists on ubuntu 16.04
                      – Scott Stensland
                      Mar 31 '16 at 19:34




                      this bug also exists on ubuntu 16.04
                      – Scott Stensland
                      Mar 31 '16 at 19:34




                      1




                      1




                      The bug has been marked as "Fix Released".
                      – user364819
                      Apr 5 '16 at 12:17




                      The bug has been marked as "Fix Released".
                      – user364819
                      Apr 5 '16 at 12:17












                      I just change my mirror default to the best server and its work for me.
                      – habibun
                      Jul 23 '17 at 15:28




                      I just change my mirror default to the best server and its work for me.
                      – habibun
                      Jul 23 '17 at 15:28










                      up vote
                      77
                      down vote













                      The easiest way to fix this is:



                      sudo apt-get clean
                      sudo apt-get update





                      share|improve this answer

















                      • 9




                        After trying the accepted answer I still had the same errors, trying this immediately afterwards fixed the issue
                        – Alex
                        Oct 21 '15 at 10:50






                      • 15




                        Doing sudo rm -rf /var/lib/apt/lists/* then sudo apto-get clean fixed the problem for me also. Neither worked in isolation.
                        – Cam
                        Oct 29 '15 at 23:27







                      • 1




                        This should be the correct answer.
                        – Clayton Dukes
                        Jan 11 '16 at 18:07






                      • 2




                        does not help on ubuntu 16.04 ... neither does the comment above help any
                        – Scott Stensland
                        Mar 31 '16 at 19:46






                      • 1




                        sudo apt-get clean did not help with 16.04, but sudo rm -rf /var/lib/apt/lists/* fixed it
                        – sdaffa23fdsf
                        Aug 29 '16 at 0:18














                      up vote
                      77
                      down vote













                      The easiest way to fix this is:



                      sudo apt-get clean
                      sudo apt-get update





                      share|improve this answer

















                      • 9




                        After trying the accepted answer I still had the same errors, trying this immediately afterwards fixed the issue
                        – Alex
                        Oct 21 '15 at 10:50






                      • 15




                        Doing sudo rm -rf /var/lib/apt/lists/* then sudo apto-get clean fixed the problem for me also. Neither worked in isolation.
                        – Cam
                        Oct 29 '15 at 23:27







                      • 1




                        This should be the correct answer.
                        – Clayton Dukes
                        Jan 11 '16 at 18:07






                      • 2




                        does not help on ubuntu 16.04 ... neither does the comment above help any
                        – Scott Stensland
                        Mar 31 '16 at 19:46






                      • 1




                        sudo apt-get clean did not help with 16.04, but sudo rm -rf /var/lib/apt/lists/* fixed it
                        – sdaffa23fdsf
                        Aug 29 '16 at 0:18












                      up vote
                      77
                      down vote










                      up vote
                      77
                      down vote









                      The easiest way to fix this is:



                      sudo apt-get clean
                      sudo apt-get update





                      share|improve this answer













                      The easiest way to fix this is:



                      sudo apt-get clean
                      sudo apt-get update






                      share|improve this answer













                      share|improve this answer



                      share|improve this answer











                      answered May 22 '15 at 12:25









                      realhu

                      1,15157




                      1,15157







                      • 9




                        After trying the accepted answer I still had the same errors, trying this immediately afterwards fixed the issue
                        – Alex
                        Oct 21 '15 at 10:50






                      • 15




                        Doing sudo rm -rf /var/lib/apt/lists/* then sudo apto-get clean fixed the problem for me also. Neither worked in isolation.
                        – Cam
                        Oct 29 '15 at 23:27







                      • 1




                        This should be the correct answer.
                        – Clayton Dukes
                        Jan 11 '16 at 18:07






                      • 2




                        does not help on ubuntu 16.04 ... neither does the comment above help any
                        – Scott Stensland
                        Mar 31 '16 at 19:46






                      • 1




                        sudo apt-get clean did not help with 16.04, but sudo rm -rf /var/lib/apt/lists/* fixed it
                        – sdaffa23fdsf
                        Aug 29 '16 at 0:18












                      • 9




                        After trying the accepted answer I still had the same errors, trying this immediately afterwards fixed the issue
                        – Alex
                        Oct 21 '15 at 10:50






                      • 15




                        Doing sudo rm -rf /var/lib/apt/lists/* then sudo apto-get clean fixed the problem for me also. Neither worked in isolation.
                        – Cam
                        Oct 29 '15 at 23:27







                      • 1




                        This should be the correct answer.
                        – Clayton Dukes
                        Jan 11 '16 at 18:07






                      • 2




                        does not help on ubuntu 16.04 ... neither does the comment above help any
                        – Scott Stensland
                        Mar 31 '16 at 19:46






                      • 1




                        sudo apt-get clean did not help with 16.04, but sudo rm -rf /var/lib/apt/lists/* fixed it
                        – sdaffa23fdsf
                        Aug 29 '16 at 0:18







                      9




                      9




                      After trying the accepted answer I still had the same errors, trying this immediately afterwards fixed the issue
                      – Alex
                      Oct 21 '15 at 10:50




                      After trying the accepted answer I still had the same errors, trying this immediately afterwards fixed the issue
                      – Alex
                      Oct 21 '15 at 10:50




                      15




                      15




                      Doing sudo rm -rf /var/lib/apt/lists/* then sudo apto-get clean fixed the problem for me also. Neither worked in isolation.
                      – Cam
                      Oct 29 '15 at 23:27





                      Doing sudo rm -rf /var/lib/apt/lists/* then sudo apto-get clean fixed the problem for me also. Neither worked in isolation.
                      – Cam
                      Oct 29 '15 at 23:27





                      1




                      1




                      This should be the correct answer.
                      – Clayton Dukes
                      Jan 11 '16 at 18:07




                      This should be the correct answer.
                      – Clayton Dukes
                      Jan 11 '16 at 18:07




                      2




                      2




                      does not help on ubuntu 16.04 ... neither does the comment above help any
                      – Scott Stensland
                      Mar 31 '16 at 19:46




                      does not help on ubuntu 16.04 ... neither does the comment above help any
                      – Scott Stensland
                      Mar 31 '16 at 19:46




                      1




                      1




                      sudo apt-get clean did not help with 16.04, but sudo rm -rf /var/lib/apt/lists/* fixed it
                      – sdaffa23fdsf
                      Aug 29 '16 at 0:18




                      sudo apt-get clean did not help with 16.04, but sudo rm -rf /var/lib/apt/lists/* fixed it
                      – sdaffa23fdsf
                      Aug 29 '16 at 0:18










                      up vote
                      42
                      down vote













                      I still had the problem after removing the directories and doing sudo apt-get update.

                      Only the following step solved my problem:



                      sudo sed -i -re 's/w+.archive.ubuntu.com/archive.ubuntu.com/g' /etc/apt/sources.list


                      I don't know if this is the right way of fixing it...

                      I've found the solution here.






                      share|improve this answer



















                      • 13




                        One should note that de-part indicates a server for Germany and that this script replaces to local server with the main server. Going to Software Sources the GUI-way and switching the setting there would be safer and reversible for a lot of users. The following should work for almost every country: sudo sed -i 's/[a-z][a-z].archive.ubuntu.com/archive.ubuntu.com/g' /etc/apt/sources.list
                        – LiveWireBT
                        Sep 10 '14 at 19:53














                      up vote
                      42
                      down vote













                      I still had the problem after removing the directories and doing sudo apt-get update.

                      Only the following step solved my problem:



                      sudo sed -i -re 's/w+.archive.ubuntu.com/archive.ubuntu.com/g' /etc/apt/sources.list


                      I don't know if this is the right way of fixing it...

                      I've found the solution here.






                      share|improve this answer



















                      • 13




                        One should note that de-part indicates a server for Germany and that this script replaces to local server with the main server. Going to Software Sources the GUI-way and switching the setting there would be safer and reversible for a lot of users. The following should work for almost every country: sudo sed -i 's/[a-z][a-z].archive.ubuntu.com/archive.ubuntu.com/g' /etc/apt/sources.list
                        – LiveWireBT
                        Sep 10 '14 at 19:53












                      up vote
                      42
                      down vote










                      up vote
                      42
                      down vote









                      I still had the problem after removing the directories and doing sudo apt-get update.

                      Only the following step solved my problem:



                      sudo sed -i -re 's/w+.archive.ubuntu.com/archive.ubuntu.com/g' /etc/apt/sources.list


                      I don't know if this is the right way of fixing it...

                      I've found the solution here.






                      share|improve this answer















                      I still had the problem after removing the directories and doing sudo apt-get update.

                      Only the following step solved my problem:



                      sudo sed -i -re 's/w+.archive.ubuntu.com/archive.ubuntu.com/g' /etc/apt/sources.list


                      I don't know if this is the right way of fixing it...

                      I've found the solution here.







                      share|improve this answer















                      share|improve this answer



                      share|improve this answer








                      edited Feb 4 '16 at 9:44


























                      answered Aug 27 '14 at 19:55









                      m13r

                      52847




                      52847







                      • 13




                        One should note that de-part indicates a server for Germany and that this script replaces to local server with the main server. Going to Software Sources the GUI-way and switching the setting there would be safer and reversible for a lot of users. The following should work for almost every country: sudo sed -i 's/[a-z][a-z].archive.ubuntu.com/archive.ubuntu.com/g' /etc/apt/sources.list
                        – LiveWireBT
                        Sep 10 '14 at 19:53












                      • 13




                        One should note that de-part indicates a server for Germany and that this script replaces to local server with the main server. Going to Software Sources the GUI-way and switching the setting there would be safer and reversible for a lot of users. The following should work for almost every country: sudo sed -i 's/[a-z][a-z].archive.ubuntu.com/archive.ubuntu.com/g' /etc/apt/sources.list
                        – LiveWireBT
                        Sep 10 '14 at 19:53







                      13




                      13




                      One should note that de-part indicates a server for Germany and that this script replaces to local server with the main server. Going to Software Sources the GUI-way and switching the setting there would be safer and reversible for a lot of users. The following should work for almost every country: sudo sed -i 's/[a-z][a-z].archive.ubuntu.com/archive.ubuntu.com/g' /etc/apt/sources.list
                      – LiveWireBT
                      Sep 10 '14 at 19:53




                      One should note that de-part indicates a server for Germany and that this script replaces to local server with the main server. Going to Software Sources the GUI-way and switching the setting there would be safer and reversible for a lot of users. The following should work for almost every country: sudo sed -i 's/[a-z][a-z].archive.ubuntu.com/archive.ubuntu.com/g' /etc/apt/sources.list
                      – LiveWireBT
                      Sep 10 '14 at 19:53










                      up vote
                      24
                      down vote













                      The only solution that worked for me is from unix.stackexchange.



                      It happens because there's a known bug it apt, and the solution is to update with a different compression method, so the files load correctly and the checksum succeeds.



                      Give this a try:



                      sudo rm -rf /var/lib/apt/lists/partial
                      sudo apt-get update -o Acquire::CompressionTypes::Order::=gz


                      (thanks @brook_hong from the comments for the rm part)






                      share|improve this answer



















                      • 3




                        This is the only solution here that worked for me. Thanks.
                        – Cerin
                        Jun 21 '16 at 17:53






                      • 2




                        It worked for me too. Note that you don't have to always run this command. Just run it once, and then you can run "apt-get update" without error.
                        – dalf
                        Jul 6 '16 at 1:35






                      • 1




                        Before try with the option, we must clean the partial folder -- sudo rm -rf /var/lib/apt/lists/partial. I wrote an article for why. brookhong.github.io/2016/10/10/…
                        – brook hong
                        Oct 10 '16 at 10:17







                      • 1




                        I tried using the generic solution from various forums but this works out of the box. Thank you.
                        – wkhwilo
                        May 26 at 14:41










                      • Worked for me on Ubuntu 16.04/linux mint
                        – David Okwii
                        Jun 13 at 17:09














                      up vote
                      24
                      down vote













                      The only solution that worked for me is from unix.stackexchange.



                      It happens because there's a known bug it apt, and the solution is to update with a different compression method, so the files load correctly and the checksum succeeds.



                      Give this a try:



                      sudo rm -rf /var/lib/apt/lists/partial
                      sudo apt-get update -o Acquire::CompressionTypes::Order::=gz


                      (thanks @brook_hong from the comments for the rm part)






                      share|improve this answer



















                      • 3




                        This is the only solution here that worked for me. Thanks.
                        – Cerin
                        Jun 21 '16 at 17:53






                      • 2




                        It worked for me too. Note that you don't have to always run this command. Just run it once, and then you can run "apt-get update" without error.
                        – dalf
                        Jul 6 '16 at 1:35






                      • 1




                        Before try with the option, we must clean the partial folder -- sudo rm -rf /var/lib/apt/lists/partial. I wrote an article for why. brookhong.github.io/2016/10/10/…
                        – brook hong
                        Oct 10 '16 at 10:17







                      • 1




                        I tried using the generic solution from various forums but this works out of the box. Thank you.
                        – wkhwilo
                        May 26 at 14:41










                      • Worked for me on Ubuntu 16.04/linux mint
                        – David Okwii
                        Jun 13 at 17:09












                      up vote
                      24
                      down vote










                      up vote
                      24
                      down vote









                      The only solution that worked for me is from unix.stackexchange.



                      It happens because there's a known bug it apt, and the solution is to update with a different compression method, so the files load correctly and the checksum succeeds.



                      Give this a try:



                      sudo rm -rf /var/lib/apt/lists/partial
                      sudo apt-get update -o Acquire::CompressionTypes::Order::=gz


                      (thanks @brook_hong from the comments for the rm part)






                      share|improve this answer















                      The only solution that worked for me is from unix.stackexchange.



                      It happens because there's a known bug it apt, and the solution is to update with a different compression method, so the files load correctly and the checksum succeeds.



                      Give this a try:



                      sudo rm -rf /var/lib/apt/lists/partial
                      sudo apt-get update -o Acquire::CompressionTypes::Order::=gz


                      (thanks @brook_hong from the comments for the rm part)







                      share|improve this answer















                      share|improve this answer



                      share|improve this answer








                      edited Apr 13 '17 at 12:37









                      Community♦

                      1




                      1











                      answered May 31 '16 at 14:13









                      auval

                      49347




                      49347







                      • 3




                        This is the only solution here that worked for me. Thanks.
                        – Cerin
                        Jun 21 '16 at 17:53






                      • 2




                        It worked for me too. Note that you don't have to always run this command. Just run it once, and then you can run "apt-get update" without error.
                        – dalf
                        Jul 6 '16 at 1:35






                      • 1




                        Before try with the option, we must clean the partial folder -- sudo rm -rf /var/lib/apt/lists/partial. I wrote an article for why. brookhong.github.io/2016/10/10/…
                        – brook hong
                        Oct 10 '16 at 10:17







                      • 1




                        I tried using the generic solution from various forums but this works out of the box. Thank you.
                        – wkhwilo
                        May 26 at 14:41










                      • Worked for me on Ubuntu 16.04/linux mint
                        – David Okwii
                        Jun 13 at 17:09












                      • 3




                        This is the only solution here that worked for me. Thanks.
                        – Cerin
                        Jun 21 '16 at 17:53






                      • 2




                        It worked for me too. Note that you don't have to always run this command. Just run it once, and then you can run "apt-get update" without error.
                        – dalf
                        Jul 6 '16 at 1:35






                      • 1




                        Before try with the option, we must clean the partial folder -- sudo rm -rf /var/lib/apt/lists/partial. I wrote an article for why. brookhong.github.io/2016/10/10/…
                        – brook hong
                        Oct 10 '16 at 10:17







                      • 1




                        I tried using the generic solution from various forums but this works out of the box. Thank you.
                        – wkhwilo
                        May 26 at 14:41










                      • Worked for me on Ubuntu 16.04/linux mint
                        – David Okwii
                        Jun 13 at 17:09







                      3




                      3




                      This is the only solution here that worked for me. Thanks.
                      – Cerin
                      Jun 21 '16 at 17:53




                      This is the only solution here that worked for me. Thanks.
                      – Cerin
                      Jun 21 '16 at 17:53




                      2




                      2




                      It worked for me too. Note that you don't have to always run this command. Just run it once, and then you can run "apt-get update" without error.
                      – dalf
                      Jul 6 '16 at 1:35




                      It worked for me too. Note that you don't have to always run this command. Just run it once, and then you can run "apt-get update" without error.
                      – dalf
                      Jul 6 '16 at 1:35




                      1




                      1




                      Before try with the option, we must clean the partial folder -- sudo rm -rf /var/lib/apt/lists/partial. I wrote an article for why. brookhong.github.io/2016/10/10/…
                      – brook hong
                      Oct 10 '16 at 10:17





                      Before try with the option, we must clean the partial folder -- sudo rm -rf /var/lib/apt/lists/partial. I wrote an article for why. brookhong.github.io/2016/10/10/…
                      – brook hong
                      Oct 10 '16 at 10:17





                      1




                      1




                      I tried using the generic solution from various forums but this works out of the box. Thank you.
                      – wkhwilo
                      May 26 at 14:41




                      I tried using the generic solution from various forums but this works out of the box. Thank you.
                      – wkhwilo
                      May 26 at 14:41












                      Worked for me on Ubuntu 16.04/linux mint
                      – David Okwii
                      Jun 13 at 17:09




                      Worked for me on Ubuntu 16.04/linux mint
                      – David Okwii
                      Jun 13 at 17:09










                      up vote
                      22
                      down vote













                      This can happen when your mirror is not up to date or serving errors from being overloaded. You can either wait a while and try again, or switch to another mirror:



                      • How can I get apt to use a mirror close to me, or choose a faster mirror?





                      share|improve this answer



















                      • 2




                        Why does a server not being up to date, or being overloaded, cause a file with the correct name to successfully download (in the sense that the connection doesn't terminate until all the bytes are sent and received), but be corrupted? (I'm not asserting that doesn't happen, I'm just hoping you might be able to explain why it does.)
                        – Eliah Kagan
                        Aug 13 '12 at 21:30







                      • 3




                        @EliahKagan The problem normally is not that the file itself is corrupted, but that there is a (I am simplifying but not too much) data file and an index file containing the hash (fingerprint) of the data file. When the repositories are updated (happens every hour) on the server one file after the other gets updated. Now it can happen that your client (apt-get or similar) accesses the server when the data file has been updated but the index file has not been updated (or vice versa), yet. Then the hash doesn't match the data file and the client (falsely) assumes that the data file is corrupted.
                        – Patrick Häcker
                        Apr 14 '14 at 6:49






                      • 1




                        Changing the mirror worked for me when none of the above answers did.
                        – mango
                        Mar 25 '16 at 16:16














                      up vote
                      22
                      down vote













                      This can happen when your mirror is not up to date or serving errors from being overloaded. You can either wait a while and try again, or switch to another mirror:



                      • How can I get apt to use a mirror close to me, or choose a faster mirror?





                      share|improve this answer



















                      • 2




                        Why does a server not being up to date, or being overloaded, cause a file with the correct name to successfully download (in the sense that the connection doesn't terminate until all the bytes are sent and received), but be corrupted? (I'm not asserting that doesn't happen, I'm just hoping you might be able to explain why it does.)
                        – Eliah Kagan
                        Aug 13 '12 at 21:30







                      • 3




                        @EliahKagan The problem normally is not that the file itself is corrupted, but that there is a (I am simplifying but not too much) data file and an index file containing the hash (fingerprint) of the data file. When the repositories are updated (happens every hour) on the server one file after the other gets updated. Now it can happen that your client (apt-get or similar) accesses the server when the data file has been updated but the index file has not been updated (or vice versa), yet. Then the hash doesn't match the data file and the client (falsely) assumes that the data file is corrupted.
                        – Patrick Häcker
                        Apr 14 '14 at 6:49






                      • 1




                        Changing the mirror worked for me when none of the above answers did.
                        – mango
                        Mar 25 '16 at 16:16












                      up vote
                      22
                      down vote










                      up vote
                      22
                      down vote









                      This can happen when your mirror is not up to date or serving errors from being overloaded. You can either wait a while and try again, or switch to another mirror:



                      • How can I get apt to use a mirror close to me, or choose a faster mirror?





                      share|improve this answer















                      This can happen when your mirror is not up to date or serving errors from being overloaded. You can either wait a while and try again, or switch to another mirror:



                      • 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:25









                      Community♦

                      1




                      1











                      answered Apr 28 '12 at 2:04









                      Jorge Castro

                      34.5k104421614




                      34.5k104421614







                      • 2




                        Why does a server not being up to date, or being overloaded, cause a file with the correct name to successfully download (in the sense that the connection doesn't terminate until all the bytes are sent and received), but be corrupted? (I'm not asserting that doesn't happen, I'm just hoping you might be able to explain why it does.)
                        – Eliah Kagan
                        Aug 13 '12 at 21:30







                      • 3




                        @EliahKagan The problem normally is not that the file itself is corrupted, but that there is a (I am simplifying but not too much) data file and an index file containing the hash (fingerprint) of the data file. When the repositories are updated (happens every hour) on the server one file after the other gets updated. Now it can happen that your client (apt-get or similar) accesses the server when the data file has been updated but the index file has not been updated (or vice versa), yet. Then the hash doesn't match the data file and the client (falsely) assumes that the data file is corrupted.
                        – Patrick Häcker
                        Apr 14 '14 at 6:49






                      • 1




                        Changing the mirror worked for me when none of the above answers did.
                        – mango
                        Mar 25 '16 at 16:16












                      • 2




                        Why does a server not being up to date, or being overloaded, cause a file with the correct name to successfully download (in the sense that the connection doesn't terminate until all the bytes are sent and received), but be corrupted? (I'm not asserting that doesn't happen, I'm just hoping you might be able to explain why it does.)
                        – Eliah Kagan
                        Aug 13 '12 at 21:30







                      • 3




                        @EliahKagan The problem normally is not that the file itself is corrupted, but that there is a (I am simplifying but not too much) data file and an index file containing the hash (fingerprint) of the data file. When the repositories are updated (happens every hour) on the server one file after the other gets updated. Now it can happen that your client (apt-get or similar) accesses the server when the data file has been updated but the index file has not been updated (or vice versa), yet. Then the hash doesn't match the data file and the client (falsely) assumes that the data file is corrupted.
                        – Patrick Häcker
                        Apr 14 '14 at 6:49






                      • 1




                        Changing the mirror worked for me when none of the above answers did.
                        – mango
                        Mar 25 '16 at 16:16







                      2




                      2




                      Why does a server not being up to date, or being overloaded, cause a file with the correct name to successfully download (in the sense that the connection doesn't terminate until all the bytes are sent and received), but be corrupted? (I'm not asserting that doesn't happen, I'm just hoping you might be able to explain why it does.)
                      – Eliah Kagan
                      Aug 13 '12 at 21:30





                      Why does a server not being up to date, or being overloaded, cause a file with the correct name to successfully download (in the sense that the connection doesn't terminate until all the bytes are sent and received), but be corrupted? (I'm not asserting that doesn't happen, I'm just hoping you might be able to explain why it does.)
                      – Eliah Kagan
                      Aug 13 '12 at 21:30





                      3




                      3




                      @EliahKagan The problem normally is not that the file itself is corrupted, but that there is a (I am simplifying but not too much) data file and an index file containing the hash (fingerprint) of the data file. When the repositories are updated (happens every hour) on the server one file after the other gets updated. Now it can happen that your client (apt-get or similar) accesses the server when the data file has been updated but the index file has not been updated (or vice versa), yet. Then the hash doesn't match the data file and the client (falsely) assumes that the data file is corrupted.
                      – Patrick Häcker
                      Apr 14 '14 at 6:49




                      @EliahKagan The problem normally is not that the file itself is corrupted, but that there is a (I am simplifying but not too much) data file and an index file containing the hash (fingerprint) of the data file. When the repositories are updated (happens every hour) on the server one file after the other gets updated. Now it can happen that your client (apt-get or similar) accesses the server when the data file has been updated but the index file has not been updated (or vice versa), yet. Then the hash doesn't match the data file and the client (falsely) assumes that the data file is corrupted.
                      – Patrick Häcker
                      Apr 14 '14 at 6:49




                      1




                      1




                      Changing the mirror worked for me when none of the above answers did.
                      – mango
                      Mar 25 '16 at 16:16




                      Changing the mirror worked for me when none of the above answers did.
                      – mango
                      Mar 25 '16 at 16:16










                      up vote
                      5
                      down vote













                      If you're behind a proxy, then create a file named 99fixbadproxy in /etc/apt/apt.conf.d/:



                      sudo gedit /etc/apt/apt.conf.d/99fixbadproxy


                      Paste this into 99fixbadproxy and save it:



                      Acquire::http::Pipeline-Depth 0;
                      Acquire::http::No-Cache true;
                      Acquire::BrokenProxy true;


                      Now run the update command:



                      sudo apt-get update





                      share|improve this answer



























                        up vote
                        5
                        down vote













                        If you're behind a proxy, then create a file named 99fixbadproxy in /etc/apt/apt.conf.d/:



                        sudo gedit /etc/apt/apt.conf.d/99fixbadproxy


                        Paste this into 99fixbadproxy and save it:



                        Acquire::http::Pipeline-Depth 0;
                        Acquire::http::No-Cache true;
                        Acquire::BrokenProxy true;


                        Now run the update command:



                        sudo apt-get update





                        share|improve this answer

























                          up vote
                          5
                          down vote










                          up vote
                          5
                          down vote









                          If you're behind a proxy, then create a file named 99fixbadproxy in /etc/apt/apt.conf.d/:



                          sudo gedit /etc/apt/apt.conf.d/99fixbadproxy


                          Paste this into 99fixbadproxy and save it:



                          Acquire::http::Pipeline-Depth 0;
                          Acquire::http::No-Cache true;
                          Acquire::BrokenProxy true;


                          Now run the update command:



                          sudo apt-get update





                          share|improve this answer















                          If you're behind a proxy, then create a file named 99fixbadproxy in /etc/apt/apt.conf.d/:



                          sudo gedit /etc/apt/apt.conf.d/99fixbadproxy


                          Paste this into 99fixbadproxy and save it:



                          Acquire::http::Pipeline-Depth 0;
                          Acquire::http::No-Cache true;
                          Acquire::BrokenProxy true;


                          Now run the update command:



                          sudo apt-get update






                          share|improve this answer















                          share|improve this answer



                          share|improve this answer








                          edited Aug 8 '16 at 21:43


























                          answered Aug 8 '16 at 21:37









                          Musaffa

                          22334




                          22334




















                              up vote
                              4
                              down vote













                              The following commands may solve your issue.





                              sudo rm -R /var/lib/apt/lists/partial/*


                              and then



                              sudo apt-get update && sudo apt-get upgrade


                              it will solve your problem. I also faced the same problem but the above commands solved the problem for me. So give them a try.



                              Solution reference






                              share|improve this answer

















                              • 4




                                I just tried, and it did not work; The first apt-get update created files in the same place again in that directory.
                                – Volker Siegel
                                Jan 23 '15 at 11:17














                              up vote
                              4
                              down vote













                              The following commands may solve your issue.





                              sudo rm -R /var/lib/apt/lists/partial/*


                              and then



                              sudo apt-get update && sudo apt-get upgrade


                              it will solve your problem. I also faced the same problem but the above commands solved the problem for me. So give them a try.



                              Solution reference






                              share|improve this answer

















                              • 4




                                I just tried, and it did not work; The first apt-get update created files in the same place again in that directory.
                                – Volker Siegel
                                Jan 23 '15 at 11:17












                              up vote
                              4
                              down vote










                              up vote
                              4
                              down vote









                              The following commands may solve your issue.





                              sudo rm -R /var/lib/apt/lists/partial/*


                              and then



                              sudo apt-get update && sudo apt-get upgrade


                              it will solve your problem. I also faced the same problem but the above commands solved the problem for me. So give them a try.



                              Solution reference






                              share|improve this answer













                              The following commands may solve your issue.





                              sudo rm -R /var/lib/apt/lists/partial/*


                              and then



                              sudo apt-get update && sudo apt-get upgrade


                              it will solve your problem. I also faced the same problem but the above commands solved the problem for me. So give them a try.



                              Solution reference







                              share|improve this answer













                              share|improve this answer



                              share|improve this answer











                              answered Dec 17 '13 at 21:47









                              Shaharia Azam

                              25924




                              25924







                              • 4




                                I just tried, and it did not work; The first apt-get update created files in the same place again in that directory.
                                – Volker Siegel
                                Jan 23 '15 at 11:17












                              • 4




                                I just tried, and it did not work; The first apt-get update created files in the same place again in that directory.
                                – Volker Siegel
                                Jan 23 '15 at 11:17







                              4




                              4




                              I just tried, and it did not work; The first apt-get update created files in the same place again in that directory.
                              – Volker Siegel
                              Jan 23 '15 at 11:17




                              I just tried, and it did not work; The first apt-get update created files in the same place again in that directory.
                              – Volker Siegel
                              Jan 23 '15 at 11:17










                              up vote
                              3
                              down vote













                              I had the exact same problem and all solutions provided using the terminal did not help.



                              For me, it was by going into:



                              Settings → Software & Updates → Ubuntu Software: Download from: Change Local to Main Server.



                              It starts reloading the repos and updating. When I enter:



                              sudo apt-get update


                              After that, there was no problem at all. I'm using Ubuntu 14.04.4 LTS.






                              share|improve this answer



























                                up vote
                                3
                                down vote













                                I had the exact same problem and all solutions provided using the terminal did not help.



                                For me, it was by going into:



                                Settings → Software & Updates → Ubuntu Software: Download from: Change Local to Main Server.



                                It starts reloading the repos and updating. When I enter:



                                sudo apt-get update


                                After that, there was no problem at all. I'm using Ubuntu 14.04.4 LTS.






                                share|improve this answer

























                                  up vote
                                  3
                                  down vote










                                  up vote
                                  3
                                  down vote









                                  I had the exact same problem and all solutions provided using the terminal did not help.



                                  For me, it was by going into:



                                  Settings → Software & Updates → Ubuntu Software: Download from: Change Local to Main Server.



                                  It starts reloading the repos and updating. When I enter:



                                  sudo apt-get update


                                  After that, there was no problem at all. I'm using Ubuntu 14.04.4 LTS.






                                  share|improve this answer















                                  I had the exact same problem and all solutions provided using the terminal did not help.



                                  For me, it was by going into:



                                  Settings → Software & Updates → Ubuntu Software: Download from: Change Local to Main Server.



                                  It starts reloading the repos and updating. When I enter:



                                  sudo apt-get update


                                  After that, there was no problem at all. I'm using Ubuntu 14.04.4 LTS.







                                  share|improve this answer















                                  share|improve this answer



                                  share|improve this answer








                                  edited Mar 8 at 16:04









                                  galoget

                                  2,0862719




                                  2,0862719











                                  answered Jul 28 '16 at 9:56









                                  habibun

                                  3931313




                                  3931313




















                                      up vote
                                      1
                                      down vote













                                      I don't know that it's proper solution or not, but I did the following and the error message's gone:



                                      After typing sudo apt-get update in terminal, it gives me the names of some packages which cause the error then I did the following:



                                      Update manager(software update) → Setting → Configure Software Sources → Other software[tab] → Uncheck the packages



                                      After pressing the "close" bottom, update manager started to check for update automatically again and I saw this message:"the software on this computer is up to date. Last checked 2 seconds ago."



                                      Kubuntu 12.04






                                      share|improve this answer























                                      • This worked for me, and no other solution posted here worked. Except I don't have the Ubuntu UI (running command-line only under WSL), So instead, for each package <pkg> where the error occurred, I ran `sudo apt-get install <pkg>'. I am on Ubuntu 16.04.
                                        – Yitz
                                        Feb 20 at 13:29















                                      up vote
                                      1
                                      down vote













                                      I don't know that it's proper solution or not, but I did the following and the error message's gone:



                                      After typing sudo apt-get update in terminal, it gives me the names of some packages which cause the error then I did the following:



                                      Update manager(software update) → Setting → Configure Software Sources → Other software[tab] → Uncheck the packages



                                      After pressing the "close" bottom, update manager started to check for update automatically again and I saw this message:"the software on this computer is up to date. Last checked 2 seconds ago."



                                      Kubuntu 12.04






                                      share|improve this answer























                                      • This worked for me, and no other solution posted here worked. Except I don't have the Ubuntu UI (running command-line only under WSL), So instead, for each package <pkg> where the error occurred, I ran `sudo apt-get install <pkg>'. I am on Ubuntu 16.04.
                                        – Yitz
                                        Feb 20 at 13:29













                                      up vote
                                      1
                                      down vote










                                      up vote
                                      1
                                      down vote









                                      I don't know that it's proper solution or not, but I did the following and the error message's gone:



                                      After typing sudo apt-get update in terminal, it gives me the names of some packages which cause the error then I did the following:



                                      Update manager(software update) → Setting → Configure Software Sources → Other software[tab] → Uncheck the packages



                                      After pressing the "close" bottom, update manager started to check for update automatically again and I saw this message:"the software on this computer is up to date. Last checked 2 seconds ago."



                                      Kubuntu 12.04






                                      share|improve this answer















                                      I don't know that it's proper solution or not, but I did the following and the error message's gone:



                                      After typing sudo apt-get update in terminal, it gives me the names of some packages which cause the error then I did the following:



                                      Update manager(software update) → Setting → Configure Software Sources → Other software[tab] → Uncheck the packages



                                      After pressing the "close" bottom, update manager started to check for update automatically again and I saw this message:"the software on this computer is up to date. Last checked 2 seconds ago."



                                      Kubuntu 12.04







                                      share|improve this answer















                                      share|improve this answer



                                      share|improve this answer








                                      edited Mar 30 '14 at 23:23









                                      user.dz

                                      33.3k1185165




                                      33.3k1185165











                                      answered Mar 30 '14 at 22:03









                                      Hassan.J.

                                      111




                                      111











                                      • This worked for me, and no other solution posted here worked. Except I don't have the Ubuntu UI (running command-line only under WSL), So instead, for each package <pkg> where the error occurred, I ran `sudo apt-get install <pkg>'. I am on Ubuntu 16.04.
                                        – Yitz
                                        Feb 20 at 13:29

















                                      • This worked for me, and no other solution posted here worked. Except I don't have the Ubuntu UI (running command-line only under WSL), So instead, for each package <pkg> where the error occurred, I ran `sudo apt-get install <pkg>'. I am on Ubuntu 16.04.
                                        – Yitz
                                        Feb 20 at 13:29
















                                      This worked for me, and no other solution posted here worked. Except I don't have the Ubuntu UI (running command-line only under WSL), So instead, for each package <pkg> where the error occurred, I ran `sudo apt-get install <pkg>'. I am on Ubuntu 16.04.
                                      – Yitz
                                      Feb 20 at 13:29





                                      This worked for me, and no other solution posted here worked. Except I don't have the Ubuntu UI (running command-line only under WSL), So instead, for each package <pkg> where the error occurred, I ran `sudo apt-get install <pkg>'. I am on Ubuntu 16.04.
                                      – Yitz
                                      Feb 20 at 13:29











                                      up vote
                                      1
                                      down vote













                                      I had the exact same problem and all solutions provided using the terminal did not help.



                                      For me, it was by going into:



                                      Settings → Software & Updates → Other software: Uncheck all the boxes and press close.



                                      It starts reloading the repos and updating. When I enter:



                                      sudo apt-get update


                                      After that, there was no problem at all. I'm using Ubuntu 13.10.






                                      share|improve this answer























                                      • This does work yet it effectively blinds the machine from being able to install packages not part of the core build (until those checkboxes are re-activated later) ... yet necessary at times just to achieve an error free apt-get update which enables install of targeted packages
                                        – Scott Stensland
                                        Apr 6 '16 at 15:39














                                      up vote
                                      1
                                      down vote













                                      I had the exact same problem and all solutions provided using the terminal did not help.



                                      For me, it was by going into:



                                      Settings → Software & Updates → Other software: Uncheck all the boxes and press close.



                                      It starts reloading the repos and updating. When I enter:



                                      sudo apt-get update


                                      After that, there was no problem at all. I'm using Ubuntu 13.10.






                                      share|improve this answer























                                      • This does work yet it effectively blinds the machine from being able to install packages not part of the core build (until those checkboxes are re-activated later) ... yet necessary at times just to achieve an error free apt-get update which enables install of targeted packages
                                        – Scott Stensland
                                        Apr 6 '16 at 15:39












                                      up vote
                                      1
                                      down vote










                                      up vote
                                      1
                                      down vote









                                      I had the exact same problem and all solutions provided using the terminal did not help.



                                      For me, it was by going into:



                                      Settings → Software & Updates → Other software: Uncheck all the boxes and press close.



                                      It starts reloading the repos and updating. When I enter:



                                      sudo apt-get update


                                      After that, there was no problem at all. I'm using Ubuntu 13.10.






                                      share|improve this answer















                                      I had the exact same problem and all solutions provided using the terminal did not help.



                                      For me, it was by going into:



                                      Settings → Software & Updates → Other software: Uncheck all the boxes and press close.



                                      It starts reloading the repos and updating. When I enter:



                                      sudo apt-get update


                                      After that, there was no problem at all. I'm using Ubuntu 13.10.







                                      share|improve this answer















                                      share|improve this answer



                                      share|improve this answer








                                      edited Jul 13 '14 at 2:16









                                      Mateo

                                      7,15584870




                                      7,15584870











                                      answered Jul 12 '14 at 14:30









                                      Paul London

                                      191




                                      191











                                      • This does work yet it effectively blinds the machine from being able to install packages not part of the core build (until those checkboxes are re-activated later) ... yet necessary at times just to achieve an error free apt-get update which enables install of targeted packages
                                        – Scott Stensland
                                        Apr 6 '16 at 15:39
















                                      • This does work yet it effectively blinds the machine from being able to install packages not part of the core build (until those checkboxes are re-activated later) ... yet necessary at times just to achieve an error free apt-get update which enables install of targeted packages
                                        – Scott Stensland
                                        Apr 6 '16 at 15:39















                                      This does work yet it effectively blinds the machine from being able to install packages not part of the core build (until those checkboxes are re-activated later) ... yet necessary at times just to achieve an error free apt-get update which enables install of targeted packages
                                      – Scott Stensland
                                      Apr 6 '16 at 15:39




                                      This does work yet it effectively blinds the machine from being able to install packages not part of the core build (until those checkboxes are re-activated later) ... yet necessary at times just to achieve an error free apt-get update which enables install of targeted packages
                                      – Scott Stensland
                                      Apr 6 '16 at 15:39










                                      up vote
                                      1
                                      down vote













                                      I had a similar problem and solved it by opening theh application "Software & Updates" and, in "Ubuntu Software" tab, changing the value of "Download from" (in that drop-down list, try to select, for example, Main Server if it was not like that).






                                      share|improve this answer





















                                      • Yes, only thing that worked for me. Switzerland server seems broken.
                                        – Eric MORAND
                                        Sep 4 '17 at 14:26














                                      up vote
                                      1
                                      down vote













                                      I had a similar problem and solved it by opening theh application "Software & Updates" and, in "Ubuntu Software" tab, changing the value of "Download from" (in that drop-down list, try to select, for example, Main Server if it was not like that).






                                      share|improve this answer





















                                      • Yes, only thing that worked for me. Switzerland server seems broken.
                                        – Eric MORAND
                                        Sep 4 '17 at 14:26












                                      up vote
                                      1
                                      down vote










                                      up vote
                                      1
                                      down vote









                                      I had a similar problem and solved it by opening theh application "Software & Updates" and, in "Ubuntu Software" tab, changing the value of "Download from" (in that drop-down list, try to select, for example, Main Server if it was not like that).






                                      share|improve this answer













                                      I had a similar problem and solved it by opening theh application "Software & Updates" and, in "Ubuntu Software" tab, changing the value of "Download from" (in that drop-down list, try to select, for example, Main Server if it was not like that).







                                      share|improve this answer













                                      share|improve this answer



                                      share|improve this answer











                                      answered Aug 5 '14 at 19:59









                                      Andrea Pravato

                                      111




                                      111











                                      • Yes, only thing that worked for me. Switzerland server seems broken.
                                        – Eric MORAND
                                        Sep 4 '17 at 14:26
















                                      • Yes, only thing that worked for me. Switzerland server seems broken.
                                        – Eric MORAND
                                        Sep 4 '17 at 14:26















                                      Yes, only thing that worked for me. Switzerland server seems broken.
                                      – Eric MORAND
                                      Sep 4 '17 at 14:26




                                      Yes, only thing that worked for me. Switzerland server seems broken.
                                      – Eric MORAND
                                      Sep 4 '17 at 14:26










                                      up vote
                                      0
                                      down vote













                                      As follow @robie-basak, I used apt-cacher-ng as mirror caching. So I Remove the proxy and the problem solved.



                                      I remove the proxy in file /etc/apt/apt.conf.d/01proxy:



                                      #Acquire::http::Proxy "http://xxx.xx.xx.xx:4321";


                                      Then need to:



                                      sudo rm -rf /var/lib/apt/lists/*
                                      sudo aptitude update
                                      sudo aptitude upgrade





                                      share|improve this answer

























                                        up vote
                                        0
                                        down vote













                                        As follow @robie-basak, I used apt-cacher-ng as mirror caching. So I Remove the proxy and the problem solved.



                                        I remove the proxy in file /etc/apt/apt.conf.d/01proxy:



                                        #Acquire::http::Proxy "http://xxx.xx.xx.xx:4321";


                                        Then need to:



                                        sudo rm -rf /var/lib/apt/lists/*
                                        sudo aptitude update
                                        sudo aptitude upgrade





                                        share|improve this answer























                                          up vote
                                          0
                                          down vote










                                          up vote
                                          0
                                          down vote









                                          As follow @robie-basak, I used apt-cacher-ng as mirror caching. So I Remove the proxy and the problem solved.



                                          I remove the proxy in file /etc/apt/apt.conf.d/01proxy:



                                          #Acquire::http::Proxy "http://xxx.xx.xx.xx:4321";


                                          Then need to:



                                          sudo rm -rf /var/lib/apt/lists/*
                                          sudo aptitude update
                                          sudo aptitude upgrade





                                          share|improve this answer













                                          As follow @robie-basak, I used apt-cacher-ng as mirror caching. So I Remove the proxy and the problem solved.



                                          I remove the proxy in file /etc/apt/apt.conf.d/01proxy:



                                          #Acquire::http::Proxy "http://xxx.xx.xx.xx:4321";


                                          Then need to:



                                          sudo rm -rf /var/lib/apt/lists/*
                                          sudo aptitude update
                                          sudo aptitude upgrade






                                          share|improve this answer













                                          share|improve this answer



                                          share|improve this answer











                                          answered Mar 2 '16 at 6:14









                                          shgnInc

                                          1,07331423




                                          1,07331423




















                                              up vote
                                              0
                                              down vote













                                              I had just recently install Ubuntu 17.10 and was getting the same error of Hash Sum Mismatch for a some repository.I went to Software and Checked Source as shown below and there were no problems further for downloading repository from the terminal.



                                              My Software and Update Section






                                              share|improve this answer

























                                                up vote
                                                0
                                                down vote













                                                I had just recently install Ubuntu 17.10 and was getting the same error of Hash Sum Mismatch for a some repository.I went to Software and Checked Source as shown below and there were no problems further for downloading repository from the terminal.



                                                My Software and Update Section






                                                share|improve this answer























                                                  up vote
                                                  0
                                                  down vote










                                                  up vote
                                                  0
                                                  down vote









                                                  I had just recently install Ubuntu 17.10 and was getting the same error of Hash Sum Mismatch for a some repository.I went to Software and Checked Source as shown below and there were no problems further for downloading repository from the terminal.



                                                  My Software and Update Section






                                                  share|improve this answer













                                                  I had just recently install Ubuntu 17.10 and was getting the same error of Hash Sum Mismatch for a some repository.I went to Software and Checked Source as shown below and there were no problems further for downloading repository from the terminal.



                                                  My Software and Update Section







                                                  share|improve this answer













                                                  share|improve this answer



                                                  share|improve this answer











                                                  answered Dec 10 '17 at 20:24









                                                  Rahul Soshte

                                                  211




                                                  211




















                                                      up vote
                                                      0
                                                      down vote













                                                      This can happen if you're running a router with parental controls, and havent put your raspberry pi into an "unmanaged" list. For me, I could see the url was redirecting to a circle domain, managed by the router.



                                                      So I just added my pi to the unmanaged list, and it worked fine.






                                                      share|improve this answer

























                                                        up vote
                                                        0
                                                        down vote













                                                        This can happen if you're running a router with parental controls, and havent put your raspberry pi into an "unmanaged" list. For me, I could see the url was redirecting to a circle domain, managed by the router.



                                                        So I just added my pi to the unmanaged list, and it worked fine.






                                                        share|improve this answer























                                                          up vote
                                                          0
                                                          down vote










                                                          up vote
                                                          0
                                                          down vote









                                                          This can happen if you're running a router with parental controls, and havent put your raspberry pi into an "unmanaged" list. For me, I could see the url was redirecting to a circle domain, managed by the router.



                                                          So I just added my pi to the unmanaged list, and it worked fine.






                                                          share|improve this answer













                                                          This can happen if you're running a router with parental controls, and havent put your raspberry pi into an "unmanaged" list. For me, I could see the url was redirecting to a circle domain, managed by the router.



                                                          So I just added my pi to the unmanaged list, and it worked fine.







                                                          share|improve this answer













                                                          share|improve this answer



                                                          share|improve this answer











                                                          answered Feb 19 at 19:51









                                                          brad parks

                                                          9221914




                                                          9221914




















                                                              up vote
                                                              0
                                                              down vote













                                                              I have resolved all the packages not being installed by running this command:



                                                              sudo apt-get install PACKAGENAME


                                                              For each of the packages. They are now installed and the "Hash Sum mismatch" error has gone.






                                                              share|improve this answer



























                                                                up vote
                                                                0
                                                                down vote













                                                                I have resolved all the packages not being installed by running this command:



                                                                sudo apt-get install PACKAGENAME


                                                                For each of the packages. They are now installed and the "Hash Sum mismatch" error has gone.






                                                                share|improve this answer

























                                                                  up vote
                                                                  0
                                                                  down vote










                                                                  up vote
                                                                  0
                                                                  down vote









                                                                  I have resolved all the packages not being installed by running this command:



                                                                  sudo apt-get install PACKAGENAME


                                                                  For each of the packages. They are now installed and the "Hash Sum mismatch" error has gone.






                                                                  share|improve this answer















                                                                  I have resolved all the packages not being installed by running this command:



                                                                  sudo apt-get install PACKAGENAME


                                                                  For each of the packages. They are now installed and the "Hash Sum mismatch" error has gone.







                                                                  share|improve this answer















                                                                  share|improve this answer



                                                                  share|improve this answer








                                                                  edited Mar 8 at 15:40









                                                                  galoget

                                                                  2,0862719




                                                                  2,0862719











                                                                  answered Jun 23 '13 at 12:50









                                                                  BiggJJ

                                                                  1,113622




                                                                  1,113622















                                                                      protected by Anwar May 22 '15 at 15:16



                                                                      Thank you for your interest in this question.
                                                                      Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).



                                                                      Would you like to answer one of these unanswered questions instead?


                                                                      Popular posts from this blog

                                                                      pylint3 and pip3 broken

                                                                      Missing snmpget and snmpwalk

                                                                      How to enroll fingerprints to Ubuntu 17.10 with VFS491