Fixing Apt Update Issues Due to Unreachable Proxy on Ubuntu

If you’re anything like me – always tinkering, optimizing, and confidently declaring “I’ve got this” – chances are you once set up a local proxy like apt-cacher-ng to speed up updates. However, encountering an apt update proxy error on Ubuntu can sometimes put a dent in that efficiency. At the time, it felt brilliant. Blazing fast. Efficient. A true sysadmin masterstroke.

But eventually, it led to the dreaded apt update proxy error and some classic Ubuntu headaches.

Fast forward to today, and that proxy? Long gone. Maybe it was running on a Raspberry Pi that quietly gave up. Maybe it’s buried somewhere in your tech graveyard drawer labeled “I’ll fix it one day.” Meanwhile, your loyal Ubuntu system is still trying to reach it every time you run apt update, only to be ghosted by the apt update proxy error that Ubuntu users often encounter.

If your terminal is throwing errors like this, apt update proxy error, Ubuntu message:

Err:3 http://archive.ubuntu.com/ubuntu noble InRelease
  Could not connect to 100.71.86.54:3142 (100.71.86.54), connection timed out

Then yes, you’re still trying to talk to your long-lost proxy. That’s your forgotten genius coming back to bite you.

But don’t worry – it’s an easy fix. Let’s undo that bit of over-enthusiastic optimisation and get your updates flowing again, overcoming the apt update proxy error Ubuntu issue for good.

Let’s fix that! 👇

Understanding the Issue

Ubuntu’s apt package manager uses configuration files under /etc/apt/apt.conf.d/ to define various behaviours. In many environments, a file named 01proxy exists and includes a line like:

Acquire::http::Proxy "http://100.71.86.54:3142";

This setting tells apt to fetch all package data through a specific proxy server. When that proxy is offline, unreachable, or misconfigured, apt operations like update, install, or upgrade will fail, often resulting in what is known as the apt update proxy error, or the Ubuntu error.

Note, however, that starting with Ubuntu 23.10 (Mantic Minotaur) and now in 24.04 and 24.10 (Noble), Ubuntu has transitioned to the new “.sources” format located at:

/etc/apt/sources.list.d/ubuntu.sources

You can check the docs here at Ubuntu for more.

Steps to Fix the Problem

Step 1: Remove the Proxy Configuration File

After making a backup of this file, open a terminal and run:

sudo rm /etc/apt/apt.conf.d/01proxy

This command removes the file, forcing the system to use the unreachable proxy server.

Step 2: Refresh the Package Lists

After removing the proxy setting, run:

sudo apt update

You should now see output from public mirrors like archive.ubuntu.com or security.ubuntu.com, without any reference to the 3142 proxy, resolving your apt update proxy error Ubuntu issue.

Optional: Additional Checks

  • If you’re in a corporate environment, a proxy might be required. Speak to your IT team before removing any proxy settings.
  • To ensure there are no other hidden proxy configurations, you can check environment variables with:
env | grep -i proxy

Unset any values you find that are not needed.

You May Also Be Interested In

Wrapping Up

Removing an old or unreachable proxy setting is not only a quick fix but also a satisfying one, especially when it resolves those head-scratching apt update errors. Once the proxy is out of the way, your Ubuntu machine can finally get back to doing what it does best — fetching updates directly from the official mirrors, with no detours, delays, or dead ends.

That said, if you’re working in a managed or corporate environment, it’s important to double-check with your system administrator before making changes. After all, the proxy might have been intentionally configured for network compliance or control. However, if this was your long-forgotten experiment in local caching, then well done — you’ve just cleaned up after past-you.

As a result, your updates should now run smoothly, and your command line can breathe a well-earned sigh of relief. So go ahead — patch away, stay secure, and say goodbye to the infamous apt update proxy error that has frustrated so many Ubuntu users.

About Anto Online

Anto, a seasoned technologist with over two decades of experience, has traversed the tech landscape from Desktop Support Engineer to enterprise application consultant, specializing in AWS serverless technologies. He guides clients in leveraging serverless solutions while passionately exploring cutting-edge cloud concepts beyond his daily work. Anto's dedication to continuous learning, experimentation, and collaboration makes him a true inspiration, igniting others' interest in the transformative power of cloud computing.

View all posts by Anto Online

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.