How to delete all this?


#1

When I use synaptic package manager and click on reload this happens:

an error occured!

W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list.d/additional-repositories.list:1 and /etc/apt/sources.list.d/additional-repositories.list:2
W: Target Packages (main/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list.d/additional-repositories.list:1 and /etc/apt/sources.list.d/additional-repositories.list:2
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list.d/additional-repositories.list:1 and /etc/apt/sources.list.d/additional-repositories.list:2
W: Target Translations (main/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list.d/additional-repositories.list:1 and /etc/apt/sources.list.d/additional-repositories.list:2
W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list.d/additional-repositories.list:1 and /etc/apt/sources.list.d/additional-repositories.list:2
W: Target DEP-11 (main/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list.d/additional-repositories.list:1 and /etc/apt/sources.list.d/additional-repositories.list:2
W: Target DEP-11 (main/dep11/Components-all.yml) is configured multiple times in /etc/apt/sources.list.d/additional-repositories.list:1 and /etc/apt/sources.list.d/additional-repositories.list:2
W: Target CNF (main/cnf/Commands-amd64) is configured multiple times in /etc/apt/sources.list.d/additional-repositories.list:1 and /etc/apt/sources.list.d/additional-repositories.list:2
W: Target CNF (main/cnf/Commands-all) is configured multiple times in /etc/apt/sources.list.d/additional-repositories.list:1 and /etc/apt/sources.list.d/additional-repositories.list:2
W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list.d/additional-repositories.list:1 and /etc/apt/sources.list.d/additional-repositories.list:3
W: Target Packages (main/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list.d/additional-repositories.list:1 and /etc/apt/sources.list.d/additional-repositories.list:3
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list.d/additional-repositories.list:1 and /etc/apt/sources.list.d/additional-repositories.list:3
W: Target Translations (main/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list.d/additional-repositories.list:1 and /etc/apt/sources.list.d/additional-repositories.list:3
W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list.d/additional-repositories.list:1 and /etc/apt/sources.list.d/additional-repositories.list:3
W: Target DEP-11 (main/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list.d/additional-repositories.list:1 and /etc/apt/sources.list.d/additional-repositories.list:3
W: Target DEP-11 (main/dep11/Components-all.yml) is configured multiple times in /etc/apt/sources.list.d/additional-repositories.list:1 and /etc/apt/sources.list.d/additional-repositories.list:3
W: Target CNF (main/cnf/Commands-amd64) is configured multiple times in /etc/apt/sources.list.d/additional-repositories.list:1 and /etc/apt/sources.list.d/additional-repositories.list:3
W: Target CNF (main/cnf/Commands-all) is configured multiple times in /etc/apt/sources.list.d/additional-repositories.list:1 and /etc/apt/sources.list.d/additional-repositories.list:3

Thanks for any help
Bill


#2

Pretty much tells you what you need to know.

Warning

Description

The number of the line within the file. additional-repositories.list:1 for example means, that line one of the file additional-repositories.list contains the conflict.

Solution:

Just open the mentioned file(s) and edit them accordingly. Just delete the duplicates and you are done. Except the duplicates are there for a reason.


#3

looks like you might also be able to deal with the duplicates in synaptic under settings - repositories. i don’t have the same /additional-repositories.list sub-directory that you do, but all of my entries from /sources.list.d are there.

i would offer the same caution as @Akito that there may be a valid reason you have duplicates. the highest voted answer in the link below explains how to choose the duplicate listing that is a subset of the other. it also mentions commenting out the duplicate line with a # in case you find at some other time that it is needed.


#4

I don’t know if the Terminal use of sudo apt-get autoclean would work here. It seems to remove duplicates after updates from what I have seen on my system. I could be wrong on that.


#5

Make a backup of your /etc/apt dir
e.g.

sudo -i
cd /var/tmp/
(/var/tmp/ doesn’t get cleaned/deleted on reboot)
cp -r /etc/apt .

Then switch back to /etc/apt, and make an extra backup of your sources.list file

cd /etc/apt
cp sources.list sources.list.bkup

Find duplicate entries and remove them (by overwriting /etc/apt/sources.list)
cat sources.list.bkup | uniq > sources.list

Of source YMMV and it may not in fact be /etc/apt/sources.list file that has duplicate entries… you might have to hunt around for other .list files or in the folder /etc/apt/sources.list.d/

And of course you have to run “sudo apt update” after editing the files…