Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

This question already has an answer here:

I cannot install any packages for Ubuntu 12.04. Even after clearing files under:

/var/lib/dpkg/lists/partial/* /var/lib/dpkg/lists/*

Changed the repository and tried apt-get clean and all other resolutions provided by Ubuntu forums. Nothing worked, I had same issue before and reinstalled Ubuntu. But that is not the permanent solution.

:~$ sudo apt-get update
95% [1 Sources bzip2 0 B] [Waiting for headers] [Waiting for headers]bzip2: (stdin) is not a bzip2 file.
98% [2 Packages bzip2 0 B] [Connecting to archive.ubuntu.com (]bzip2: (stdin) is not a bzip2 file.
100% [6 Translation-en bzip2 0 B] [Waiting for headers]                                                                                                      154 B/s 0sbzip2: (stdin) is not a bzip2 file.
Fetched 5,722 B in 14s (403 B/s)
W: Failed to fetch gzip:/var/lib/apt/lists/partial/archive.ubuntu.com_ubuntu_dists_precise_universe_source_Sources  Hash Sum mismatch
W: Failed to fetch gzip:/var/lib/apt/lists/partial/archive.ubuntu.com_ubuntu_dists_precise_main_binary-amd64_Packages  Hash Sum mismatch
W: Failed to fetch gzip:/var/lib/apt/lists/partial/archive.ubuntu.com_ubuntu_dists_precise_universe_binary-amd64_Packages  Hash Sum mismatch
W: Failed to fetch gzip:/var/lib/apt/lists/partial/archive.ubuntu.com_ubuntu_dists_precise_main_binary-i386_Packages  Hash Sum mismatch
W: Failed to fetch gzip:/var/lib/apt/lists/partial/archive.ubuntu.com_ubuntu_dists_precise_universe_binary-i386_Packages  Hash Sum mismatch
W: Failed to fetch gzip:/var/lib/apt/lists/partial/archive.ubuntu.com_ubuntu_dists_precise_universe_i18n_Translation-en  Encountered a section with no Package: header
E: Some index files failed to download. They have been ignored, or old ones used instead.

Hope Ubuntu developers should definitely know the quick workaround to fix this. This is a very common issue for all Ubuntu users which is unsolvable. Kindly create a global FAQ answers to fix this issue.

share|improve this question

marked as duplicate by Chris Wilson, vasa1, Raja, Mik, Tom Brossman Mar 7 '13 at 19:27

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

I had this problem before, fixed it by changing the protocol to ftp. try a mirror that supports ftp access. and if you are already using ftp, try a http mirror. –  Anam Ahmed Mar 7 '13 at 7:56
Can you please post me the apt sources list which you have used for it –  Sivaprakash Mar 7 '13 at 9:11
I have tried with a changing the mirror to an ftp. but it fails, hope there could be some other work around –  Sivaprakash Mar 7 '13 at 9:20
What modifications have you made to the OS? Your prompt looks a bit "different". Why are you trying to download both i386 and amd64 packages? Where did you get your .iso from? –  user25656 Mar 7 '13 at 9:36
apt-get failes due to the issue in wget. wget fails to download files. It downloads the files with 0 bytes. Anyone knows what could be the issue.. –  Sivaprakash Mar 7 '13 at 10:03

1 Answer 1

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

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

then run:

sudo apt-get update

Source: Trouble downloading updates due to "Hash sum mismatch" error

share|improve this answer
This worked for me, thanks. –  Tek Mar 31 '14 at 9:36
You're very welcome! –  Frederik Spang Mar 31 '14 at 11:26

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