Home › Linux & shell

W: Target Packages is configured multiple times in /etc/apt/sources.list (Linux) — how to fix

W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/example.list:1
W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/example.list:1

Quick fix: Open the two files and line numbers named in the warning (e.g. sudo nano /etc/apt/sources.list.d/example.list), delete or comment out (#) one of the duplicate lines, then run sudo apt update. Find all entries with grep -rn '^deb\|^URIs' /etc/apt/sources.list /etc/apt/sources.list.d/.

What it means

APT reads /etc/apt/sources.list plus every *.list and *.sources file in /etc/apt/sources.list.d/. If two entries point at the same repository, suite and component, APT warns that the same target (the Packages index, the Translation files...) is configured more than once. Updates and installs still work. The warning just repeats on every apt update until you remove the duplicate.

The message names both locations as file:line. Read them carefully, because the two entries are often in different files.

Step 1: find the duplicates

grep -rn --include='*.list' --include='sources.list' '^deb' /etc/apt/
grep -rn --include='*.sources' -E '^(URIs|Suites|Components)' /etc/apt/sources.list.d/

Cause 1: a third-party repo was added twice

This happens when you add a repo by hand and then the package's installer adds its own file as well (some browsers and editors do this), or when you run an install script twice under different file names.

Fix: keep one file and delete the other:

ls -l /etc/apt/sources.list.d/
sudo rm /etc/apt/sources.list.d/the-duplicate.list
sudo apt update

Keep the file the vendor's package created, because it may rewrite that file on updates.

Cause 2: a duplicate line inside sources.list

The same line pasted twice, or main listed on one line and main restricted on another for the same suite. Comment one out:

sudo nano /etc/apt/sources.list
deb http://archive.ubuntu.com/ubuntu jammy main restricted universe
# deb http://archive.ubuntu.com/ubuntu jammy main universe     <- duplicate

Note that a component listed in two lines for the same URL and suite is still a duplicate, even when the lines aren't identical.

Cause 3: old and new format both present (Ubuntu 24.04+)

Since Ubuntu 24.04 the default sources live in deb822 format in /etc/apt/sources.list.d/ubuntu.sources, and /etc/apt/sources.list should contain only a comment. After an upgrade, or if you pasted the old lines back into sources.list, the same repositories are defined in both files.

Fix: keep ubuntu.sources, and comment out the matching deb lines in /etc/apt/sources.list:

sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
sudo sed -i 's/^deb /# deb /' /etc/apt/sources.list
sudo apt update

Check that apt update still fetches the main archive and security repositories afterwards.

Cause 4: a PPA added twice

add-apt-repository writes one file per PPA, but running it with different spellings, or adding the same PPA by hand, can leave two files. Remove one with:

sudo add-apt-repository --remove ppa:owner/name

Then re-add it once if you still need it.

Verify

sudo apt update 2>&1 | grep -i "configured multiple times" || echo "clean"

Last updated 2026-12-04.