I got this error while upgrading from ubuntu 17.04 to 17.10 saying that I have configured sources.list file multiple times. please help
Asked
Active
Viewed 62 times
1
1 Answers
1
Check for duplicate sources with this command (source):
S="/etc/apt/sources.list" ; S2="$S ${S}.d/*.list" ; grep -b "^deb`cat $S2 | grep -i "^deb[[:space:]]http" | sort | uniq -dc | sed -e 's;[[:space:]]\+[[:digit:]]\+[[:space:]]\+deb\(.\+$\);\1;g'`$" $S2
(You will set 2 error messages if /etc/apt/sources.list.d/ directory is empty. That's ok.)
If you see any red text lines on the output of this command -> then you have to edit the according file(s) and remove the duplicate entries.

Bob
- 401
/etc/apt/sources.list
(and any in 'sources.list.d') and added extra lines creating the duplicates rather than checking to see if they already exist, and thus not adding them a second time. You only need to look at the files (looking for lines containing the text in the warnings) and remove or comment out (put a # at beginning of the line, allowing restoration if you # the wrong line) the duplicates. Also note they likely be "W:" messages, or WARNINGS and NOT errors. (note: "got this error" but you didn't provide the error) – guiverc Feb 11 '18 at 07:23