How to Fix 429 Too Many Requests Error in Ubuntu (apt update/upgrade Failed) – Step-by-Step DevOps Guide

Everything looked normal at first.

The server was up, the network was stable, and I started with a routine apt update and apt upgrade before installing the required tools.

No errors. No warnings. Just a typical setup.

And then suddenly, the process failed with:

429 Too Many Requests.

That’s where things got confusing. The system was fine, the internet was working, and nothing seemed broken. But Ubuntu apt update and upgrade were failing with a 429 error, and that was enough to stop everything.

429 too many requests error in Ubuntu apt update upgrade during server setup

What Actually Happened During Ubuntu Server Setup

The setup itself was simple and standard:

  • Fresh Ubuntu server
  • Running apt update and apt upgrade
  • Preparing to install tools like Grafana and NGINX

Everything should have worked normally.

But instead of updating packages, apt update and upgrade failed with a 429 error.

The strange part? Internet connectivity was fine. The server was reachable. No firewall or DNS issues.

That’s when it became clear — this wasn’t a local problem.

The issue was coming directly from the Ubuntu repository servers.


What 429 Too Many Requests Means in Ubuntu apt update/upgrade

In real-world DevOps environments, this usually means:

Your server is sending too many requests in a short time, and the Ubuntu mirror is rate-limiting your IP address.

This commonly happens in scenarios like:

  • Cloud servers (AWS, Azure, VPS with shared IP addresses)
  • Automation scripts triggering frequent updates
  • Overloaded or busy regional mirrors

This is not a bug in Ubuntu—it’s a server-side protection mechanism.


How I Fixed the Ubuntu apt update/upgrade 429 Error (Step-by-Step)

Step 1: Retry the update command

sudo apt update

Retrying didn’t resolve the issue. The error persisted.


Step 2: Identify the problematic repository

Err:84 http://security.ubuntu.com/ubuntu noble-updates/main amd64 linux-firmware amd64 20240318.git3b128b60-0ubuntu2.26
  429 Too Many Requests [IP: 185.125.190.81 80]

This confirmed that the issue was coming from the regional mirror.


Step 3: Switch to a stable global Ubuntu mirror

sudo nano /etc/apt/sources.list

Replace the existing entries with the following:

deb http://archive.ubuntu.com/ubuntu noble main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu noble-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu noble-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu noble-security main restricted universe multiverse

After updating the file, save and exit:

  • Press CTRL + O to save the file
  • Press Enter to confirm
  • Press CTRL + X to exit the editor

This is the most reliable fix for apt update failed Ubuntu 429 error.


Step 4: Clean cache and update again

sudo apt clean
sudo apt update

This time, the update completed successfully without errors.


Step 5: Upgrade system packages

sudo apt upgrade -y

The upgrade process completed without any issues.


Why This Error Happens (429 Too Many Requests in Ubuntu apt update)

This error usually shows up when the Ubuntu server you’re downloading from is under heavy load, especially during apt update or apt upgrade.

  • The Ubuntu mirror server is busy or overloaded
  • Your server IP might be shared with other users (common in cloud/VPS environments)
  • Too many update requests were sent in a short time

In simple terms, the server is basically saying: “You’re making too many requests too quickly — slow down or try a different mirror.”


Common Mistakes During Ubuntu Server Setup

  • Using the default regional mirror without checking performance
  • Running apt update multiple times while debugging
  • Retrying again and again without clearing the cache

These are very common when apt update fails in Ubuntu, especially during initial server setup.


How to Avoid 429 Too Many Requests Error in Ubuntu

  • Use a stable global Ubuntu mirror from the beginning
  • Avoid running apt update repeatedly unless needed
  • Add retry logic with a delay in automation scripts

A small change here can save a lot of time during deployments and prevent apt update or apt upgrade failures.


Real-World Scenario

This issue often appears while setting up tools like Grafana, Prometheus, or Docker on a fresh Ubuntu server.

In my case, it completely blocked the installation process until the repository mirror was updated.


Final Result After Fixing the Issue

ubuntu apt update success after fixing 429 too many requests error

Important note: The system update completed successfully after switching to a stable mirror.


If you are facing a 429 Too Many Requests error in Ubuntu apt update or upgrade, the root cause is almost always repository rate limiting—not your system configuration.

It’s a simple issue, but it can have a big impact during server setup and deployment.

If you know another developer facing this, feel free to share it with them.

Selvaraj Iyyappan
April 18, 2026
f X W