APT_USE_IPV4

Set this environment variable to force network class to use only IPv4 protocols.

The default is to use the IPv6/IPv4 dual stack protocol.
Set the APT_USE_IPV4 environment variable in the following circumstances:
  • If your computer is only IPv4 enabled and IPv6 protocol is disabled.
  • If your computer has IPv4 address mapping defined in /etc/hosts file.