Nala creates its own nala-sources.list
file located at /etc/apt/sources.list.d/nala-sources.list
. This is documented for the nala fetch
command.
Default approach
For Ubuntu, Nala parses the list found at https://launchpad.net/ubuntu/+archivemirrors-rss
. However, it's possible that some of these mirrors may be returning errors like you experienced (which should only happen in extremely rare cases). But this will be explicitly stated in the apt
output, so that you can easily disable that particular mirror.
In this case, either manually remove the mirror from nala-sources.list
, or run nala fetch
again, and select other mirrors, without the one giving errors.
Please note: Special attention must be paid to the mirror list if you're using any other architecture than x64
(for instance arm64
on a Raspberry Pi), in which case the mirror must be hosting ubuntu-ports
. Use this script to find out which mirrors include the ports, and build your nala-sources.list
from these mirrors.
Custom approach
Another approach I've recently followed is to simply use the default national mirrors from your neighboring countries as Nala mirrors. In this way you're sure that it's only the official mirrors that are used, and an added bonus is that they also provide both updates
, security
and backports
branches as well - AND they also provide ubuntu-ports
for other architectures.
So I've done the following: In my normal sources.list
, I use the main repo http://archive.ubuntu.com/ubuntu/
, but I reside in Denmark.
Then, my /etc/apt/sources.list.d/nala-sources.list
goes like this:
# Sources file built for nala
deb http://de.archive.ubuntu.com/ubuntu/ jammy main restricted universe multiverse
deb http://de.archive.ubuntu.com/ubuntu/ jammy-updates main restricted universe multiverse
deb http://de.archive.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse
deb http://de.archive.ubuntu.com/ubuntu/ jammy-backports main restricted universe multiverse
deb http://dk.archive.ubuntu.com/ubuntu/ jammy main restricted universe multiverse
deb http://dk.archive.ubuntu.com/ubuntu/ jammy-updates main restricted universe multiverse
deb http://dk.archive.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse
deb http://dk.archive.ubuntu.com/ubuntu/ jammy-backports main restricted universe multiverse
deb http://no.archive.ubuntu.com/ubuntu/ jammy main restricted universe multiverse
deb http://no.archive.ubuntu.com/ubuntu/ jammy-updates main restricted universe multiverse
deb http://no.archive.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse
deb http://no.archive.ubuntu.com/ubuntu/ jammy-backports main restricted universe multiverse
deb http://se.archive.ubuntu.com/ubuntu/ jammy main restricted universe multiverse
deb http://se.archive.ubuntu.com/ubuntu/ jammy-updates main restricted universe multiverse
deb http://se.archive.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse
deb http://se.archive.ubuntu.com/ubuntu/ jammy-backports main restricted universe multiverse
So I use the mirrors from Denmark, Germany Norway and Sweden as additional Nala sources. This means Nala can do parallel downloads from the neighboring countries, and the chance that the official national mirror throws an apt
error should be very small.