debian apt-get or aptitude update Hash Sum mismatch

We need “apt-get update” to update the debian source list if we want to upgrade debian to next release. When i was going to upgrade debian , i got error “Hash Sum mismatch” something like:

W: Failed to fetch bzip2:/var/lib/apt/lists/partial/mirrors.yourmirror.com_debian_dists_wheezy_main_i18n_Translation-en  Hash Sum mismatch

E: Some index files failed to download. They have been ignored, or old ones used instead.

It happened for several times in the past, Today, when i was going to upgrade debian 7 to 7.1.0 i got this error again.

Anyway, It happened for the package server. So i decide to change the server address from the sources.list . To select fast server i used “netselect-apt” :

apt-get install netselect-apt && cd /etc/apt/ && netselect-apt -n wheezy -o sources.list

This command will install the netselect-apt and find the fast server then replace the old sources.list. It will output like:

You can exclude your local server and replace with working fast server if netselect-apt selecting the same server for you.

Hope this post will help someone!