Apt update stuck waiting for headers


I tried to update the apt cache on a machine that had not been updated in a long time:

$ sudo apt-get update

But that got stuck at one of the repositories Waiting for headers. No matter how many times I tried the command, it would get stuck at this.


The problem went away once I cleared the cache using these steps as explained here:

$ 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 

Tried with: Ubuntu 16.04

3 thoughts on “Apt update stuck waiting for headers

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.