apt-get -o Acquire::ForceIPv4=true update #To make the setting persistent, create the file 99force-ipv4 in /etc/apt/apt.conf.d/. sudo nano /etc/apt/apt.conf.d/99force-ipv4 #Put the following contents in it: Acquire::ForceIPv4 "true";