You are here

security.debian.org timing out during apt-get/aptitude updates

Submitted by Druss on Fri, 2016-09-09 02:23

On a fresh Debian 8 (Jessie) install, I found that I couldn't update the package repository using apt because security.debian.org was always timing out. While I initially thought this was because of a mirroring issue oslt, it turns out that it's because I was trying to access it via the IPV6 that my VPS was using. Turns out that the fix is reasonably straightforward. You simply tell apt not to bother with ipv6 and simply use ipv4 … like so:

echo 'Acquire::ForceIPv4 "true";' >> /etc/apt/apt.conf.d/99force-ipv4

You'll obviously need to do this as root/sudo.

Hope this helps :)