Force Debian apt to IPv4

Boris HUISGEN
Boris HUISGEN
Force Debian apt to IPv4

The Debian apt command can have sometimes problems on dual stack network hosts IPv4/IPv6. To fix that, an option exists to force this tool to IPv4 only.

Enable the IPv4 only prevents network slowness and timeouts and finally to retrieve the available upgrades.

Enable it with this configuration option:

# echo 'Acquire::ForceIPv4 "true";' > /etc/apt/apt.conf.d/99forceipv4
Boris HUISGEN
Boris HUISGEN
Blog owner
  • #apt
  • #debian
  • #linux