Since a couple of days ago, apt-get tries to contact some of the hosts from my /etc/apt/sources.list via IPv6 and fails. To force it to prefer IPv4 over IPv6, add in /etc/gai.conf:
precedence ::ffff:0:0/96 100
This can be forced globally by adding to /etc/sysctl.conf, then reloading settings with sysctl -p
net.ipv6.conf.all.disable_ipv6 = 1 net.ipv6.conf.all.forwarding = 0