There is a point to this story, but it has temporarily escaped my mind...
Contact Me MyFaceBook MyLinkedIn MyGitHub MyTwitter

Force Apt-Get to Not Use IPv6

I've implemented IPv6 on my home network and noticed that several of my Ubuntu machines have trouble updating via apt-get when it tries to reach out to the update servers via their IPv6 address, especially the repository. As a result, these servers have to wait for a lengthy timeout whenever I'm downloading updates of any sort. This has been going on for years at this point and doesn't appear to be a high priority issue, so I started looking for a way to force apt-get to use only IPv4.

To enable on a one time basis, add -o Acquire::ForceIPv4=true when running apt-get.

If you want to make the setting persistent, which is what I wanted, create /etc/apt/apt.conf.d/99force-ipv4 and put Acquire::ForceIPv4 “true”; in it.

Copyright © 2022 by Julian Easterling. SOME RIGHTS RESERVED.
Privacy Policy              Terms of Use             

Creative Commons License
Except where otherwise noted, content on this site is
licensed under a Creative Common Attribution-Share Alike 4.0 International License.

All of the opinions expressed on this website are those of Julian Easterling and
do not represent the views of any of my current and previous clients or employers in any way.

If you notice an error on the site or content that has not been properly attributed, bring
it to my attention using the contact page and I will endeavor to fix it as soon as I can.

I accept no responsibility or liability for any damages incurred by following any of
my advice or by using any of the information on my site or of those sites that I link to.