Ubuntu apt-get is getting stuck
When I try to run apt-get update it can't make a connection and gets stuck. How do I fix this?
This is a known issue with security.ubuntu.com. Apt-get will try to retrieve the updates over IPv6, but their server doesn't support IPv6. The connection eventually times out and fails.
To fix this, you can run the following command to force apt-get to use IPv4 instead:
echo 'Acquire::ForceIPv4 "true";' | tee /etc/apt/apt.conf.d/99force-ipv4