Ubuntu – apt-get update very slow, stuck at “Waiting for headers”

apt

I have looked at similar questions:

Stuck at 0% [waiting for headers]

apt-get update stuck on "Waiting for Headers" when using Windows XP ICS

However neither one of them answer my problem.

I am running 12.04 AMD64 and have recently started getting an issue that when I update my repos from my connection at home through a terminal, using sudo apt-get update, it takes forever (literally after 2 hours it was at 28%), however when I run from a different location it takes less than 5 minutes to complete.

I have attempted changing which mirror I use but that does not solve the issue. I have also cut down what is in my sources list but this also makes no difference. There are no faults on my ADSL line as I have already contacted my ISP to check this. It also makes no difference if I use a WiFi or network cable connection.

What could be my issue?


A speed test (www.speedtest.net) comes out at about 0.9 Mbps down and 0.42 Mbps up (which is a shade under the advertised line speed), I reside in South Africa and use the UCT LEG server. But I have also tried the other mirrors available in SA….none of them make a difference.

Best Answer

I found a solution which helped me here: https://www.kubuntuforums.net/showthread.php?57567-Ubuntu-problems-on-update

You can let apt-get to regenerate lists cache using:

sudo apt-get clean
cd /var/lib/apt
sudo mv lists lists.old
sudo mkdir -p lists/partial
sudo apt-get clean
sudo apt-get update 
Related Question