I removed the duplicate line I could see in /etc/apt/sources.list, but apt update still reports a source is configured multiple times. What else should I check?
Why does apt still say a source is configured multiple times?
Answers
Check every file apt reads, not just the main list. Look in /etc/apt/sources.list.d/ for files ending in .list or .sources. A graphical software tool may have added the same repository there.
You can search the configured files for the repository address or suite named in the warning. Compare the full entries before removing anything, since entries that look similar can have different components or options.
Reply to this answer
The warning usually names the file and line numbers for both copies. Read that part carefully. It may point to a second entry in another file, or to a duplicate elsewhere in the main file that was not the line you removed.
If the paths are hard to spot, run grep -RniE 'deb |URIs:|Suites:' /etc/apt/sources.list /etc/apt/sources.list.d/ and inspect the matching entries. Make a backup before editing, then remove or disable just the redundant definition.
Reply to this answer
Also check whether the warning is current. Save the edit, then run sudo apt update again and look at the fresh output. If it still appears, the warning's file paths and line numbers are the best clue. If it does not name two readable files, share the exact warning text when asking for more help, but redact any private mirror details.
Reply to this answer
Add your answer
Answers are reviewed before publication.
B2~Gadget:
I checked that directory in a text editor and it looked empty. Is there a way to see exactly which files apt is reading?
Nell:
Try listing it in a terminal with ls -la /etc/apt/sources.list.d/. The editor may not show hidden or unsupported files, and apt can read both legacy .list files and newer .sources files.