sudo apt update, stuck 0% connecting [duplicate]

When I do sudo apt update I keep getting stuck in the line below:

0% [Connecting to security.ubuntu.com (2001:67c:1360:8001::21)] 

Is there any problem with ipv6 resolution in Ubuntu? Is there a way to force ipv4 in case this is the problem ? (maybe my router is not so smart, I don't know).

Ping output:

ping6 2001:67c:1360:8001::21
PING 2001:67c:1360:8001::21(2001:67c:1360:8001::21) 56 data bytes
^C
--- 2001:67c:1360:8001::21 ping statistics ---
12 packets transmitted, 0 received, 100% packet loss, time 11000ms

Traceroute output:

 traceroute6  2001:67c:1360:8001::21traceroute to 2001:67c:1360:8001::21
 , 30 hops max, 24 byte packets
 1  * * *
 2  * * *
 3  * * *
 4  * * *
 5  * * *
 6  * * *
 7  * * *

Solution 1:

Adding -o Acquire::ForceIPv4=true after your apt-get command will force IPv4 connectivity.

For a permanent fix, create a file called /etc/apt/apt.conf.d/99force-ipv4 and add the following line to it:

Acquire::ForceIPv4 "true"; 

Solution 2:

From time to time ... like after traveling to a new location ... its good to update your locally fastest ubuntu repo server by running this probe

System Settings -> 
Software & Updates -> 
Download from -> 
Other -> 
Select Best Server