I try to use IPv6 where it’s available, but it can sometimes be difficult. It happens quite often that I can’t download packages from repositories because they aren’t configured on IPv6 virtual hosts, even when the host has an IPv6 address. For APT, you can use this trick to force IPv4 connections:

~/2016/03/prefer-ipv4-over-ipv6/
echo 'Acquire::ForceIPv4 "true";' | sudo tee /etc/apt/apt.conf.d/99force-ipv4

If you need a system-wide solution, gai.conf allows you to control connection preferences. For example, the setting below will prioritize IPv4 whenever it is available:

~/2016/03/prefer-ipv4-over-ipv6/
echo 'precedence ::ffff:0:0/96  100' | sudo tee -a /etc/gai.conf