Ubuntu's APT download mirror supplies packages and package lists. A mirror change followed by a list refresh confirms the new source without changing the release.

The same Ubuntu release is available from multiple mirrors, but the replacement must carry your system's architecture. The regular Ubuntu archive and the Ubuntu ports archive serve different architectures, so their mirror URLs are not interchangeable.

An incorrect mirror address can stop package-list refreshes and future package downloads. A backup preserves the original configuration, while refreshing the lists tests the replacement without installing or upgrading any packages.

Steps to change the APT download mirror on Ubuntu:

Use Software & Updates on an Ubuntu desktop with an Intel or AMD processor, and edit the source file on a server or an ARM computer.

Change the mirror in Software & Updates

  1. Install Software & Updates.
    $ sudo apt install software-properties-gtk

    Ubuntu 26.04 no longer includes the app by default, while Ubuntu 24.04 desktops already have it.

  2. Open Software & Updates from the application menu.
  3. Select Other… in the Download from: list on the Ubuntu Software tab.
  4. Select a server under your country.
  5. Click Choose Server.

    Ubuntu asks for your password to save the change.

  6. Click Close.
  7. Click Reload.
  8. Refresh the package lists from the new mirror.
    $ sudo apt update
    Hit:1 http://security.ubuntu.com/ubuntu resolute-security InRelease
    Hit:2 https://ftp.lanet.kr/ubuntu resolute InRelease
    Hit:3 https://ftp.lanet.kr/ubuntu resolute-updates InRelease
    Hit:4 https://ftp.lanet.kr/ubuntu resolute-backports InRelease
    All packages are up to date.

    Your new mirror appears in the Hit: or Get: lines. Err: or Failed to fetch lines mean the mirror did not work, so choose another server, or Main server to go back.

Change the mirror in the source file

  1. Pick a mirror near you from the official Ubuntu archive mirror list.

    Intel and AMD computers use a regular mirror, such as http://ftp.kaist.ac.kr/ubuntu/. ARM computers and other non-PC systems use a ports mirror, such as http://ftp.kaist.ac.kr/ubuntu-ports/, and their current source address ends in ubuntu-ports.

  2. Back up Ubuntu's source file.
    $ sudo cp /etc/apt/sources.list.d/ubuntu.sources /etc/apt/sources.list.d/ubuntu.sources.bak

    If ubuntu.sources does not exist, as on Ubuntu 22.04, use /etc/apt/sources.list here and in the next step.

  3. Open the source file in your text editor.
    $ sudoedit /etc/apt/sources.list.d/ubuntu.sources
  4. Replace the address on the first URIs: line with your mirror's address, then save the file.
    URIs: http://ftp.kaist.ac.kr/ubuntu-ports/

    Everything else in the file stays the same, including the second URIs: line, so security updates keep coming directly from Ubuntu. In /etc/apt/sources.list, change the address on each deb line except the security line.

  5. Refresh the package lists from the new mirror.
    $ sudo apt update
    Get:1 http://ftp.kaist.ac.kr/ubuntu-ports resolute InRelease [136 kB]
    Get:2 http://ports.ubuntu.com/ubuntu-ports resolute-security InRelease [137 kB]
    Get:3 http://ftp.kaist.ac.kr/ubuntu-ports resolute-updates InRelease [137 kB]
    Get:4 http://ftp.kaist.ac.kr/ubuntu-ports resolute-backports InRelease [137 kB]
    ##### snipped #####
    Fetched 27.3 MB in 7s (3670 kB/s)
    4 packages can be upgraded. Run 'apt list --upgradable' to see them.

    Your new mirror appears in the Get: or Hit: lines. Err: or Failed to fetch lines mean the mirror did not work, so put the original address back or restore the backup, then refresh again.

Share this guide