Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

On googling this error it seems that a lot of people are having this issue.

apt-get upgrade hangs at 0% [waiting for headers] apt-get install apache2 hangs at 0% [waiting for headers]. Some apt-get commands are working, but only certain packages.

Any ideas? I don't think this is an issue with slow repos because I've had it up for a long while and it hasn't budged from 0%. I have edited sources.list but I removed the lines I added when this issue presented itself and it hasn't made a difference.

Any clues would be really useful.

share|improve this question
Your Internet connection is disconnected... – Afshin Hamedi Sep 27 '14 at 5:13… read the mtu related answer, might be a help – Eslam Shapsough Oct 5 '14 at 22:30
up vote 7 down vote accepted

Try to change the server selecting update manager, definitions,downloading from, then select a server more near you. and then try again.

Edit: see this link on how to add it by editing sources.list. How can I get apt to use a mirror close to me?

share|improve this answer
any idea how to do this over ssh? – Thomas Clayson Jan 12 '12 at 10:31
You edit /etc/apt/sources.list to point to a different mirror – tumbleweed Jan 12 '12 at 10:35

The easiest approach consist of following commands:

sudo apt-get clean


sudo apt-get update


sudo apt-get install <package_name>


Let me know if it works

share|improve this answer
It worked for me.. – igaurav Dec 6 '13 at 8:41
Didn't work for me. – isomorphismes Mar 28 '14 at 8:09
@isomorphismes can you describe more ? maybe error or some screenshots – igaurav Mar 28 '14 at 14:10
I posted the question here:… – isomorphismes Mar 29 '14 at 4:03
@isomorphismes i guess that is different issue seems like misconfiguration of proxy settings. – igaurav Apr 14 '14 at 11:49

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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