Both apt-get update and upgrade hang:

sudo apt-get update
[sudo] password for xxx: 
0% [Connecting to archive.ubuntu.com (2001:67c:1360:8001::17)]

I'm able to ping archive.ubuntu.com:

ping archive.ubuntu.com
PING archive.ubuntu.com ( 56(84) bytes of data.
64 bytes from yukinko.canonical.com ( icmp_seq=1 ttl=50 time=42.2 ms
64 bytes from yukinko.canonical.com ( icmp_seq=2 ttl=50 time=42.1 ms
64 bytes from yukinko.canonical.com ( icmp_seq=3 ttl=50 time=42.1 ms
--- archive.ubuntu.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2002ms
rtt min/avg/max/mdev = 42.169/42.206/42.265/0.240 ms

I checked this question, and I don't think its the same issue.

Any tips for investigating this further?


2 Answers 2


From your output it seems to me that it's a IPv6 problem, so we should force apt to use IPv4 instead.

If we search apt.conf (5) manual for IPv4 we will find:

When downloading, force to use only the IPv4 protocol.

To enable this option we should create a file within:


the name can be anything for something relative we use 99force-ipv4, the number is the priority of config files within this directory.

Then add the below command to this file and save it:

Acquire::ForceIPv4 "true";

Then try updating your source again:

sudo apt update

Not sure of the cause of problem, however I think your university is running an internal IPv6 network; so apt is trying to connect with IPv6 to its mirrors, and there may be some incompatibility. I just tried forcing apt to use IPv4 and it worked.

Short instruction:

Also we can use echo and tee to write this config down with one command (from here):

echo 'Acquire::ForceIPv4 "true";' | sudo tee /etc/apt/apt.conf.d/99force-ipv4
  • 1
    Ok. I'll send an email to the university IT staff to investigate further, thank you for the help.
    – alf
    Apr 25, 2017 at 9:01

For me below worked:

sudo vim /etc/apt/apt.conf

Acquire::http::proxy "http://<Proxy IPaddress>:8080/";

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