How can I fix apt error “W: Target Packages … is configured multiple times”?
I just installed Ubuntu Gnome 16.04. I told it to save my documents - which worked. Some software had to be reinstalled. Now when I run sudo apt-get update I see this:
W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Packages (main/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Translations (main/i18n/Translation-en_GB) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target DEP-11 (main/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target DEP-11-icons (main/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Packages (restricted/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Packages (restricted/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Packages (restricted/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Translations (restricted/i18n/Translation-en_GB) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Translations (restricted/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target DEP-11 (restricted/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target DEP-11-icons (restricted/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Packages (multiverse/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Packages (multiverse/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Packages (multiverse/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Translations (multiverse/i18n/Translation-en_GB) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Translations (multiverse/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target DEP-11 (multiverse/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target DEP-11-icons (multiverse/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: The repository 'http://extras.ubuntu.com/ubuntu xenial Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: http://dl.google.com/linux/chrome/deb/dists/stable/Release.gpg: Signature by key 4CCA1EAF950CEE4AB83976DCA040830F7FAC5991 uses weak digest algorithm (SHA1)
W: http://repo.sinew.in/dists/stable/InRelease: Signature by key B6DA722E2E65721AF54B93966F7565879798C2FC uses weak digest algorithm (SHA1)
E: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/xenial/main/source/Sources 404 Not Found [IP: 91.189.92.152 80]
E: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/xenial/main/binary-amd64/Packages 404 Not Found [IP: 91.189.92.152 80]
E: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/xenial/main/binary-i386/Packages 404 Not Found [IP: 91.189.92.152 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.
W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Packages (main/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Translations (main/i18n/Translation-en_GB) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target DEP-11 (main/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target DEP-11-icons (main/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Packages (restricted/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Packages (restricted/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Packages (restricted/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Translations (restricted/i18n/Translation-en_GB) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Translations (restricted/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target DEP-11 (restricted/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target DEP-11-icons (restricted/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Packages (multiverse/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Packages (multiverse/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Packages (multiverse/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Translations (multiverse/i18n/Translation-en_GB) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Translations (multiverse/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target DEP-11 (multiverse/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target DEP-11-icons (multiverse/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
Is there an automated way to fix this?
apt
|
show 1 more comment
I just installed Ubuntu Gnome 16.04. I told it to save my documents - which worked. Some software had to be reinstalled. Now when I run sudo apt-get update I see this:
W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Packages (main/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Translations (main/i18n/Translation-en_GB) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target DEP-11 (main/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target DEP-11-icons (main/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Packages (restricted/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Packages (restricted/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Packages (restricted/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Translations (restricted/i18n/Translation-en_GB) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Translations (restricted/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target DEP-11 (restricted/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target DEP-11-icons (restricted/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Packages (multiverse/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Packages (multiverse/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Packages (multiverse/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Translations (multiverse/i18n/Translation-en_GB) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Translations (multiverse/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target DEP-11 (multiverse/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target DEP-11-icons (multiverse/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: The repository 'http://extras.ubuntu.com/ubuntu xenial Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: http://dl.google.com/linux/chrome/deb/dists/stable/Release.gpg: Signature by key 4CCA1EAF950CEE4AB83976DCA040830F7FAC5991 uses weak digest algorithm (SHA1)
W: http://repo.sinew.in/dists/stable/InRelease: Signature by key B6DA722E2E65721AF54B93966F7565879798C2FC uses weak digest algorithm (SHA1)
E: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/xenial/main/source/Sources 404 Not Found [IP: 91.189.92.152 80]
E: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/xenial/main/binary-amd64/Packages 404 Not Found [IP: 91.189.92.152 80]
E: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/xenial/main/binary-i386/Packages 404 Not Found [IP: 91.189.92.152 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.
W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Packages (main/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Translations (main/i18n/Translation-en_GB) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target DEP-11 (main/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target DEP-11-icons (main/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Packages (restricted/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Packages (restricted/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Packages (restricted/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Translations (restricted/i18n/Translation-en_GB) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Translations (restricted/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target DEP-11 (restricted/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target DEP-11-icons (restricted/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Packages (multiverse/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Packages (multiverse/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Packages (multiverse/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Translations (multiverse/i18n/Translation-en_GB) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Translations (multiverse/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target DEP-11 (multiverse/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target DEP-11-icons (multiverse/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
Is there an automated way to fix this?
apt
1
Wow... You have a worse case of this than I have...
– user364819
Apr 22 '16 at 22:24
I've run at least 100 16.04 VMs (of daily-build tests, Betas and Alphas) and I've had this issue in all of them...
– user364819
Apr 22 '16 at 22:28
2
Possible duplicate of how to fix error W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:2 and /etc/apt/sources.list:5
– muru
Apr 22 '16 at 22:29
2
@muru This question is asking for an automated way.
– Tim
Apr 22 '16 at 22:35
1
Same problem here, ubuntu 16.04 Desktop I had changed repositories to Main Server, after problems arose with my normal repository channel. I usually use mirror.math.ucdavis.edu/ubuntu, and I changed back to that ucdavis repository, All fixed, is that an "automatic enough" response? good luck
– Douglas
Dec 1 '16 at 18:24
|
show 1 more comment
I just installed Ubuntu Gnome 16.04. I told it to save my documents - which worked. Some software had to be reinstalled. Now when I run sudo apt-get update I see this:
W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Packages (main/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Translations (main/i18n/Translation-en_GB) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target DEP-11 (main/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target DEP-11-icons (main/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Packages (restricted/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Packages (restricted/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Packages (restricted/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Translations (restricted/i18n/Translation-en_GB) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Translations (restricted/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target DEP-11 (restricted/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target DEP-11-icons (restricted/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Packages (multiverse/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Packages (multiverse/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Packages (multiverse/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Translations (multiverse/i18n/Translation-en_GB) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Translations (multiverse/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target DEP-11 (multiverse/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target DEP-11-icons (multiverse/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: The repository 'http://extras.ubuntu.com/ubuntu xenial Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: http://dl.google.com/linux/chrome/deb/dists/stable/Release.gpg: Signature by key 4CCA1EAF950CEE4AB83976DCA040830F7FAC5991 uses weak digest algorithm (SHA1)
W: http://repo.sinew.in/dists/stable/InRelease: Signature by key B6DA722E2E65721AF54B93966F7565879798C2FC uses weak digest algorithm (SHA1)
E: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/xenial/main/source/Sources 404 Not Found [IP: 91.189.92.152 80]
E: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/xenial/main/binary-amd64/Packages 404 Not Found [IP: 91.189.92.152 80]
E: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/xenial/main/binary-i386/Packages 404 Not Found [IP: 91.189.92.152 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.
W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Packages (main/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Translations (main/i18n/Translation-en_GB) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target DEP-11 (main/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target DEP-11-icons (main/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Packages (restricted/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Packages (restricted/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Packages (restricted/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Translations (restricted/i18n/Translation-en_GB) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Translations (restricted/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target DEP-11 (restricted/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target DEP-11-icons (restricted/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Packages (multiverse/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Packages (multiverse/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Packages (multiverse/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Translations (multiverse/i18n/Translation-en_GB) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Translations (multiverse/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target DEP-11 (multiverse/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target DEP-11-icons (multiverse/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
Is there an automated way to fix this?
apt
I just installed Ubuntu Gnome 16.04. I told it to save my documents - which worked. Some software had to be reinstalled. Now when I run sudo apt-get update I see this:
W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Packages (main/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Translations (main/i18n/Translation-en_GB) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target DEP-11 (main/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target DEP-11-icons (main/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Packages (restricted/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Packages (restricted/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Packages (restricted/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Translations (restricted/i18n/Translation-en_GB) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Translations (restricted/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target DEP-11 (restricted/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target DEP-11-icons (restricted/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Packages (multiverse/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Packages (multiverse/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Packages (multiverse/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Translations (multiverse/i18n/Translation-en_GB) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Translations (multiverse/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target DEP-11 (multiverse/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target DEP-11-icons (multiverse/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: The repository 'http://extras.ubuntu.com/ubuntu xenial Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: http://dl.google.com/linux/chrome/deb/dists/stable/Release.gpg: Signature by key 4CCA1EAF950CEE4AB83976DCA040830F7FAC5991 uses weak digest algorithm (SHA1)
W: http://repo.sinew.in/dists/stable/InRelease: Signature by key B6DA722E2E65721AF54B93966F7565879798C2FC uses weak digest algorithm (SHA1)
E: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/xenial/main/source/Sources 404 Not Found [IP: 91.189.92.152 80]
E: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/xenial/main/binary-amd64/Packages 404 Not Found [IP: 91.189.92.152 80]
E: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/xenial/main/binary-i386/Packages 404 Not Found [IP: 91.189.92.152 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.
W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Packages (main/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Translations (main/i18n/Translation-en_GB) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target DEP-11 (main/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target DEP-11-icons (main/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Packages (restricted/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Packages (restricted/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Packages (restricted/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Translations (restricted/i18n/Translation-en_GB) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Translations (restricted/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target DEP-11 (restricted/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target DEP-11-icons (restricted/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Packages (multiverse/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Packages (multiverse/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Packages (multiverse/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Translations (multiverse/i18n/Translation-en_GB) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target Translations (multiverse/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target DEP-11 (multiverse/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
W: Target DEP-11-icons (multiverse/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list:33 and /etc/apt/sources.list:87
Is there an automated way to fix this?
apt
apt
edited Jan 29 '18 at 5:04
muru
1
1
asked Apr 22 '16 at 22:20
TimTim
19.6k1484139
19.6k1484139
1
Wow... You have a worse case of this than I have...
– user364819
Apr 22 '16 at 22:24
I've run at least 100 16.04 VMs (of daily-build tests, Betas and Alphas) and I've had this issue in all of them...
– user364819
Apr 22 '16 at 22:28
2
Possible duplicate of how to fix error W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:2 and /etc/apt/sources.list:5
– muru
Apr 22 '16 at 22:29
2
@muru This question is asking for an automated way.
– Tim
Apr 22 '16 at 22:35
1
Same problem here, ubuntu 16.04 Desktop I had changed repositories to Main Server, after problems arose with my normal repository channel. I usually use mirror.math.ucdavis.edu/ubuntu, and I changed back to that ucdavis repository, All fixed, is that an "automatic enough" response? good luck
– Douglas
Dec 1 '16 at 18:24
|
show 1 more comment
1
Wow... You have a worse case of this than I have...
– user364819
Apr 22 '16 at 22:24
I've run at least 100 16.04 VMs (of daily-build tests, Betas and Alphas) and I've had this issue in all of them...
– user364819
Apr 22 '16 at 22:28
2
Possible duplicate of how to fix error W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:2 and /etc/apt/sources.list:5
– muru
Apr 22 '16 at 22:29
2
@muru This question is asking for an automated way.
– Tim
Apr 22 '16 at 22:35
1
Same problem here, ubuntu 16.04 Desktop I had changed repositories to Main Server, after problems arose with my normal repository channel. I usually use mirror.math.ucdavis.edu/ubuntu, and I changed back to that ucdavis repository, All fixed, is that an "automatic enough" response? good luck
– Douglas
Dec 1 '16 at 18:24
1
1
Wow... You have a worse case of this than I have...
– user364819
Apr 22 '16 at 22:24
Wow... You have a worse case of this than I have...
– user364819
Apr 22 '16 at 22:24
I've run at least 100 16.04 VMs (of daily-build tests, Betas and Alphas) and I've had this issue in all of them...
– user364819
Apr 22 '16 at 22:28
I've run at least 100 16.04 VMs (of daily-build tests, Betas and Alphas) and I've had this issue in all of them...
– user364819
Apr 22 '16 at 22:28
2
2
Possible duplicate of how to fix error W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:2 and /etc/apt/sources.list:5
– muru
Apr 22 '16 at 22:29
Possible duplicate of how to fix error W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:2 and /etc/apt/sources.list:5
– muru
Apr 22 '16 at 22:29
2
2
@muru This question is asking for an automated way.
– Tim
Apr 22 '16 at 22:35
@muru This question is asking for an automated way.
– Tim
Apr 22 '16 at 22:35
1
1
Same problem here, ubuntu 16.04 Desktop I had changed repositories to Main Server, after problems arose with my normal repository channel. I usually use mirror.math.ucdavis.edu/ubuntu, and I changed back to that ucdavis repository, All fixed, is that an "automatic enough" response? good luck
– Douglas
Dec 1 '16 at 18:24
Same problem here, ubuntu 16.04 Desktop I had changed repositories to Main Server, after problems arose with my normal repository channel. I usually use mirror.math.ucdavis.edu/ubuntu, and I changed back to that ucdavis repository, All fixed, is that an "automatic enough" response? good luck
– Douglas
Dec 1 '16 at 18:24
|
show 1 more comment
4 Answers
4
active
oldest
votes
Recent, up-to-date solution
I wrote a Python script to automate this task. You can find the most recent version here.
Installation:
Install the prerequisites:
sudo apt install python3-apt
Download the ZIP bundle (
aptsources-cleanup.zip) from the latest release.
Usage:
sudo python3 -OEs aptsources-cleanup.zipFollow the instructions appearing on the screen.
Historical, outdated solution
This is an older, shorter and simpler version more suitable to inline quotation:
#!/usr/bin/env python3
"""
Detects and interactively deactivates duplicate Apt source entries.
Usage: sudo python3 apt-remove-duplicate-source-entries.py
"""
from __future__ import print_function
import aptsources.sourceslist
EMPTY_COMPONENT_LIST = (None,)
def get_duplicates(sourceslist):
"""
Detects and returns duplicate Apt source entries.
"""
sentry_map = dict()
duplicates = list()
for se in sourceslist.list:
if not se.invalid and not se.disabled:
for c in (se.comps or EMPTY_COMPONENT_LIST):
key = (se.type, se.uri, se.dist, c)
previous_se = sentry_map.setdefault(key, se)
if previous_se is not se:
duplicates.append((se, previous_se))
break
return duplicates
if __name__ == '__main__':
try:
input = raw_input
except NameError:
pass
sourceslist = aptsources.sourceslist.SourcesList(False)
duplicates = get_duplicates(sourceslist)
if duplicates:
for dupe, orig in duplicates:
print(
'Overlapping source entries:n'
' 1. {0}: {1}n'
' 2. {2}: {3}n'
'I disabled the latter entry.'.format(
orig.file, orig, dupe.file, dupe),
end='nn')
dupe.disabled = True
print('n{0} source entries were disabled:'.format(len(duplicates)),
*[dupe for dupe, orig in duplicates], sep='n ', end='nn')
if input('Do you want to save these changes? (y/N) ').upper() == 'Y':
sourceslist.save()
else:
print('No duplicated entries were found.')
It takes no parameter and works on all /etc/apt/sources.list* with the help of the python3-apt package. Lines don't have to be exact duplicates (even after normalization) but its enough if type, URI, suite and at least one component overlap.
I'm not sure the equality test is correct in all corner cases (e. g. various “option” strings). Please leave your comments and forks on GitHub.
Works fantastic, Thanks for your contribution
– Stepan Furman
Mar 19 '18 at 21:07
1
I don't have enough rep for an answer, so here it is. All I had to do was read the error and rm the offending "list". Example error:W: Target DEP-11-icons-small (main/dep11/icons-48x48.tar) is configured multiple times in /etc/apt/sources.list.d/brave-bionic.list:1 and /etc/apt/sources.list.d/brave-bionic.list:2. Running/etc/apt/sources.list.d/sudo rm -i brave-bionic.list.saveandsudo rm -i /etc/apt/sources.list.d/brave-bionic.listfixed this issue for me
– James L.
Sep 5 '18 at 16:11
add a comment |
For me (16.04 LTS) going to
System settings >> Software and Updates >> Other Software and removing each duplicate entry from the list worked fine.
4
I was requesting an automated method.
– Tim
Nov 6 '16 at 10:58
9
this is a better solution than read foreign python3 script before executing it... worked perfectly
– Max
Aug 28 '17 at 12:06
This is a good answer! Worked perfectly for me too
– haksayng
Nov 6 '17 at 17:02
1
Can you delete "duplicates" which have a different type? For example I havehttp://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu xenial mainandhttp://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu xenial main (source code). Is it save to remove the (source code) one (this one isn't checked either, as opposed to the other one)?
– Deruijter
Mar 1 '18 at 10:02
@Deruijter: Could you please open a new question if you have a new or follow-up question? The comment section is not suitable or meant for new questions or extended discussion. You’re welcome to send me a comment with a notification to draw my attention to it. Thanks.
– David Foerster
Jun 13 '18 at 18:07
add a comment |
Reset your repositories like this
sudo rm /etc/apt/sources.listsudo software-properties-gtk- Pick your options
- Save
(P.S. I had the same problem today after updating Ubuntu 15.10 to Ubuntu 16.04.)
add a comment |
I encountered this for 18.10. I used Synaptic to check the repositories and then deleted the ones I thought were duplicates. Result: no more error messages.
add a comment |
protected by Thomas Ward♦ Dec 1 '16 at 23:31
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?
4 Answers
4
active
oldest
votes
4 Answers
4
active
oldest
votes
active
oldest
votes
active
oldest
votes
Recent, up-to-date solution
I wrote a Python script to automate this task. You can find the most recent version here.
Installation:
Install the prerequisites:
sudo apt install python3-apt
Download the ZIP bundle (
aptsources-cleanup.zip) from the latest release.
Usage:
sudo python3 -OEs aptsources-cleanup.zipFollow the instructions appearing on the screen.
Historical, outdated solution
This is an older, shorter and simpler version more suitable to inline quotation:
#!/usr/bin/env python3
"""
Detects and interactively deactivates duplicate Apt source entries.
Usage: sudo python3 apt-remove-duplicate-source-entries.py
"""
from __future__ import print_function
import aptsources.sourceslist
EMPTY_COMPONENT_LIST = (None,)
def get_duplicates(sourceslist):
"""
Detects and returns duplicate Apt source entries.
"""
sentry_map = dict()
duplicates = list()
for se in sourceslist.list:
if not se.invalid and not se.disabled:
for c in (se.comps or EMPTY_COMPONENT_LIST):
key = (se.type, se.uri, se.dist, c)
previous_se = sentry_map.setdefault(key, se)
if previous_se is not se:
duplicates.append((se, previous_se))
break
return duplicates
if __name__ == '__main__':
try:
input = raw_input
except NameError:
pass
sourceslist = aptsources.sourceslist.SourcesList(False)
duplicates = get_duplicates(sourceslist)
if duplicates:
for dupe, orig in duplicates:
print(
'Overlapping source entries:n'
' 1. {0}: {1}n'
' 2. {2}: {3}n'
'I disabled the latter entry.'.format(
orig.file, orig, dupe.file, dupe),
end='nn')
dupe.disabled = True
print('n{0} source entries were disabled:'.format(len(duplicates)),
*[dupe for dupe, orig in duplicates], sep='n ', end='nn')
if input('Do you want to save these changes? (y/N) ').upper() == 'Y':
sourceslist.save()
else:
print('No duplicated entries were found.')
It takes no parameter and works on all /etc/apt/sources.list* with the help of the python3-apt package. Lines don't have to be exact duplicates (even after normalization) but its enough if type, URI, suite and at least one component overlap.
I'm not sure the equality test is correct in all corner cases (e. g. various “option” strings). Please leave your comments and forks on GitHub.
Works fantastic, Thanks for your contribution
– Stepan Furman
Mar 19 '18 at 21:07
1
I don't have enough rep for an answer, so here it is. All I had to do was read the error and rm the offending "list". Example error:W: Target DEP-11-icons-small (main/dep11/icons-48x48.tar) is configured multiple times in /etc/apt/sources.list.d/brave-bionic.list:1 and /etc/apt/sources.list.d/brave-bionic.list:2. Running/etc/apt/sources.list.d/sudo rm -i brave-bionic.list.saveandsudo rm -i /etc/apt/sources.list.d/brave-bionic.listfixed this issue for me
– James L.
Sep 5 '18 at 16:11
add a comment |
Recent, up-to-date solution
I wrote a Python script to automate this task. You can find the most recent version here.
Installation:
Install the prerequisites:
sudo apt install python3-apt
Download the ZIP bundle (
aptsources-cleanup.zip) from the latest release.
Usage:
sudo python3 -OEs aptsources-cleanup.zipFollow the instructions appearing on the screen.
Historical, outdated solution
This is an older, shorter and simpler version more suitable to inline quotation:
#!/usr/bin/env python3
"""
Detects and interactively deactivates duplicate Apt source entries.
Usage: sudo python3 apt-remove-duplicate-source-entries.py
"""
from __future__ import print_function
import aptsources.sourceslist
EMPTY_COMPONENT_LIST = (None,)
def get_duplicates(sourceslist):
"""
Detects and returns duplicate Apt source entries.
"""
sentry_map = dict()
duplicates = list()
for se in sourceslist.list:
if not se.invalid and not se.disabled:
for c in (se.comps or EMPTY_COMPONENT_LIST):
key = (se.type, se.uri, se.dist, c)
previous_se = sentry_map.setdefault(key, se)
if previous_se is not se:
duplicates.append((se, previous_se))
break
return duplicates
if __name__ == '__main__':
try:
input = raw_input
except NameError:
pass
sourceslist = aptsources.sourceslist.SourcesList(False)
duplicates = get_duplicates(sourceslist)
if duplicates:
for dupe, orig in duplicates:
print(
'Overlapping source entries:n'
' 1. {0}: {1}n'
' 2. {2}: {3}n'
'I disabled the latter entry.'.format(
orig.file, orig, dupe.file, dupe),
end='nn')
dupe.disabled = True
print('n{0} source entries were disabled:'.format(len(duplicates)),
*[dupe for dupe, orig in duplicates], sep='n ', end='nn')
if input('Do you want to save these changes? (y/N) ').upper() == 'Y':
sourceslist.save()
else:
print('No duplicated entries were found.')
It takes no parameter and works on all /etc/apt/sources.list* with the help of the python3-apt package. Lines don't have to be exact duplicates (even after normalization) but its enough if type, URI, suite and at least one component overlap.
I'm not sure the equality test is correct in all corner cases (e. g. various “option” strings). Please leave your comments and forks on GitHub.
Works fantastic, Thanks for your contribution
– Stepan Furman
Mar 19 '18 at 21:07
1
I don't have enough rep for an answer, so here it is. All I had to do was read the error and rm the offending "list". Example error:W: Target DEP-11-icons-small (main/dep11/icons-48x48.tar) is configured multiple times in /etc/apt/sources.list.d/brave-bionic.list:1 and /etc/apt/sources.list.d/brave-bionic.list:2. Running/etc/apt/sources.list.d/sudo rm -i brave-bionic.list.saveandsudo rm -i /etc/apt/sources.list.d/brave-bionic.listfixed this issue for me
– James L.
Sep 5 '18 at 16:11
add a comment |
Recent, up-to-date solution
I wrote a Python script to automate this task. You can find the most recent version here.
Installation:
Install the prerequisites:
sudo apt install python3-apt
Download the ZIP bundle (
aptsources-cleanup.zip) from the latest release.
Usage:
sudo python3 -OEs aptsources-cleanup.zipFollow the instructions appearing on the screen.
Historical, outdated solution
This is an older, shorter and simpler version more suitable to inline quotation:
#!/usr/bin/env python3
"""
Detects and interactively deactivates duplicate Apt source entries.
Usage: sudo python3 apt-remove-duplicate-source-entries.py
"""
from __future__ import print_function
import aptsources.sourceslist
EMPTY_COMPONENT_LIST = (None,)
def get_duplicates(sourceslist):
"""
Detects and returns duplicate Apt source entries.
"""
sentry_map = dict()
duplicates = list()
for se in sourceslist.list:
if not se.invalid and not se.disabled:
for c in (se.comps or EMPTY_COMPONENT_LIST):
key = (se.type, se.uri, se.dist, c)
previous_se = sentry_map.setdefault(key, se)
if previous_se is not se:
duplicates.append((se, previous_se))
break
return duplicates
if __name__ == '__main__':
try:
input = raw_input
except NameError:
pass
sourceslist = aptsources.sourceslist.SourcesList(False)
duplicates = get_duplicates(sourceslist)
if duplicates:
for dupe, orig in duplicates:
print(
'Overlapping source entries:n'
' 1. {0}: {1}n'
' 2. {2}: {3}n'
'I disabled the latter entry.'.format(
orig.file, orig, dupe.file, dupe),
end='nn')
dupe.disabled = True
print('n{0} source entries were disabled:'.format(len(duplicates)),
*[dupe for dupe, orig in duplicates], sep='n ', end='nn')
if input('Do you want to save these changes? (y/N) ').upper() == 'Y':
sourceslist.save()
else:
print('No duplicated entries were found.')
It takes no parameter and works on all /etc/apt/sources.list* with the help of the python3-apt package. Lines don't have to be exact duplicates (even after normalization) but its enough if type, URI, suite and at least one component overlap.
I'm not sure the equality test is correct in all corner cases (e. g. various “option” strings). Please leave your comments and forks on GitHub.
Recent, up-to-date solution
I wrote a Python script to automate this task. You can find the most recent version here.
Installation:
Install the prerequisites:
sudo apt install python3-apt
Download the ZIP bundle (
aptsources-cleanup.zip) from the latest release.
Usage:
sudo python3 -OEs aptsources-cleanup.zipFollow the instructions appearing on the screen.
Historical, outdated solution
This is an older, shorter and simpler version more suitable to inline quotation:
#!/usr/bin/env python3
"""
Detects and interactively deactivates duplicate Apt source entries.
Usage: sudo python3 apt-remove-duplicate-source-entries.py
"""
from __future__ import print_function
import aptsources.sourceslist
EMPTY_COMPONENT_LIST = (None,)
def get_duplicates(sourceslist):
"""
Detects and returns duplicate Apt source entries.
"""
sentry_map = dict()
duplicates = list()
for se in sourceslist.list:
if not se.invalid and not se.disabled:
for c in (se.comps or EMPTY_COMPONENT_LIST):
key = (se.type, se.uri, se.dist, c)
previous_se = sentry_map.setdefault(key, se)
if previous_se is not se:
duplicates.append((se, previous_se))
break
return duplicates
if __name__ == '__main__':
try:
input = raw_input
except NameError:
pass
sourceslist = aptsources.sourceslist.SourcesList(False)
duplicates = get_duplicates(sourceslist)
if duplicates:
for dupe, orig in duplicates:
print(
'Overlapping source entries:n'
' 1. {0}: {1}n'
' 2. {2}: {3}n'
'I disabled the latter entry.'.format(
orig.file, orig, dupe.file, dupe),
end='nn')
dupe.disabled = True
print('n{0} source entries were disabled:'.format(len(duplicates)),
*[dupe for dupe, orig in duplicates], sep='n ', end='nn')
if input('Do you want to save these changes? (y/N) ').upper() == 'Y':
sourceslist.save()
else:
print('No duplicated entries were found.')
It takes no parameter and works on all /etc/apt/sources.list* with the help of the python3-apt package. Lines don't have to be exact duplicates (even after normalization) but its enough if type, URI, suite and at least one component overlap.
I'm not sure the equality test is correct in all corner cases (e. g. various “option” strings). Please leave your comments and forks on GitHub.
edited May 9 '18 at 13:31
answered Apr 26 '16 at 0:35
David FoersterDavid Foerster
27.8k1364110
27.8k1364110
Works fantastic, Thanks for your contribution
– Stepan Furman
Mar 19 '18 at 21:07
1
I don't have enough rep for an answer, so here it is. All I had to do was read the error and rm the offending "list". Example error:W: Target DEP-11-icons-small (main/dep11/icons-48x48.tar) is configured multiple times in /etc/apt/sources.list.d/brave-bionic.list:1 and /etc/apt/sources.list.d/brave-bionic.list:2. Running/etc/apt/sources.list.d/sudo rm -i brave-bionic.list.saveandsudo rm -i /etc/apt/sources.list.d/brave-bionic.listfixed this issue for me
– James L.
Sep 5 '18 at 16:11
add a comment |
Works fantastic, Thanks for your contribution
– Stepan Furman
Mar 19 '18 at 21:07
1
I don't have enough rep for an answer, so here it is. All I had to do was read the error and rm the offending "list". Example error:W: Target DEP-11-icons-small (main/dep11/icons-48x48.tar) is configured multiple times in /etc/apt/sources.list.d/brave-bionic.list:1 and /etc/apt/sources.list.d/brave-bionic.list:2. Running/etc/apt/sources.list.d/sudo rm -i brave-bionic.list.saveandsudo rm -i /etc/apt/sources.list.d/brave-bionic.listfixed this issue for me
– James L.
Sep 5 '18 at 16:11
Works fantastic, Thanks for your contribution
– Stepan Furman
Mar 19 '18 at 21:07
Works fantastic, Thanks for your contribution
– Stepan Furman
Mar 19 '18 at 21:07
1
1
I don't have enough rep for an answer, so here it is. All I had to do was read the error and rm the offending "list". Example error:
W: Target DEP-11-icons-small (main/dep11/icons-48x48.tar) is configured multiple times in /etc/apt/sources.list.d/brave-bionic.list:1 and /etc/apt/sources.list.d/brave-bionic.list:2. Running /etc/apt/sources.list.d/sudo rm -i brave-bionic.list.save and sudo rm -i /etc/apt/sources.list.d/brave-bionic.list fixed this issue for me– James L.
Sep 5 '18 at 16:11
I don't have enough rep for an answer, so here it is. All I had to do was read the error and rm the offending "list". Example error:
W: Target DEP-11-icons-small (main/dep11/icons-48x48.tar) is configured multiple times in /etc/apt/sources.list.d/brave-bionic.list:1 and /etc/apt/sources.list.d/brave-bionic.list:2. Running /etc/apt/sources.list.d/sudo rm -i brave-bionic.list.save and sudo rm -i /etc/apt/sources.list.d/brave-bionic.list fixed this issue for me– James L.
Sep 5 '18 at 16:11
add a comment |
For me (16.04 LTS) going to
System settings >> Software and Updates >> Other Software and removing each duplicate entry from the list worked fine.
4
I was requesting an automated method.
– Tim
Nov 6 '16 at 10:58
9
this is a better solution than read foreign python3 script before executing it... worked perfectly
– Max
Aug 28 '17 at 12:06
This is a good answer! Worked perfectly for me too
– haksayng
Nov 6 '17 at 17:02
1
Can you delete "duplicates" which have a different type? For example I havehttp://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu xenial mainandhttp://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu xenial main (source code). Is it save to remove the (source code) one (this one isn't checked either, as opposed to the other one)?
– Deruijter
Mar 1 '18 at 10:02
@Deruijter: Could you please open a new question if you have a new or follow-up question? The comment section is not suitable or meant for new questions or extended discussion. You’re welcome to send me a comment with a notification to draw my attention to it. Thanks.
– David Foerster
Jun 13 '18 at 18:07
add a comment |
For me (16.04 LTS) going to
System settings >> Software and Updates >> Other Software and removing each duplicate entry from the list worked fine.
4
I was requesting an automated method.
– Tim
Nov 6 '16 at 10:58
9
this is a better solution than read foreign python3 script before executing it... worked perfectly
– Max
Aug 28 '17 at 12:06
This is a good answer! Worked perfectly for me too
– haksayng
Nov 6 '17 at 17:02
1
Can you delete "duplicates" which have a different type? For example I havehttp://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu xenial mainandhttp://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu xenial main (source code). Is it save to remove the (source code) one (this one isn't checked either, as opposed to the other one)?
– Deruijter
Mar 1 '18 at 10:02
@Deruijter: Could you please open a new question if you have a new or follow-up question? The comment section is not suitable or meant for new questions or extended discussion. You’re welcome to send me a comment with a notification to draw my attention to it. Thanks.
– David Foerster
Jun 13 '18 at 18:07
add a comment |
For me (16.04 LTS) going to
System settings >> Software and Updates >> Other Software and removing each duplicate entry from the list worked fine.
For me (16.04 LTS) going to
System settings >> Software and Updates >> Other Software and removing each duplicate entry from the list worked fine.
edited Nov 24 '17 at 18:42
Tim
19.6k1484139
19.6k1484139
answered Nov 6 '16 at 10:50
learnerlearner
592612
592612
4
I was requesting an automated method.
– Tim
Nov 6 '16 at 10:58
9
this is a better solution than read foreign python3 script before executing it... worked perfectly
– Max
Aug 28 '17 at 12:06
This is a good answer! Worked perfectly for me too
– haksayng
Nov 6 '17 at 17:02
1
Can you delete "duplicates" which have a different type? For example I havehttp://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu xenial mainandhttp://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu xenial main (source code). Is it save to remove the (source code) one (this one isn't checked either, as opposed to the other one)?
– Deruijter
Mar 1 '18 at 10:02
@Deruijter: Could you please open a new question if you have a new or follow-up question? The comment section is not suitable or meant for new questions or extended discussion. You’re welcome to send me a comment with a notification to draw my attention to it. Thanks.
– David Foerster
Jun 13 '18 at 18:07
add a comment |
4
I was requesting an automated method.
– Tim
Nov 6 '16 at 10:58
9
this is a better solution than read foreign python3 script before executing it... worked perfectly
– Max
Aug 28 '17 at 12:06
This is a good answer! Worked perfectly for me too
– haksayng
Nov 6 '17 at 17:02
1
Can you delete "duplicates" which have a different type? For example I havehttp://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu xenial mainandhttp://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu xenial main (source code). Is it save to remove the (source code) one (this one isn't checked either, as opposed to the other one)?
– Deruijter
Mar 1 '18 at 10:02
@Deruijter: Could you please open a new question if you have a new or follow-up question? The comment section is not suitable or meant for new questions or extended discussion. You’re welcome to send me a comment with a notification to draw my attention to it. Thanks.
– David Foerster
Jun 13 '18 at 18:07
4
4
I was requesting an automated method.
– Tim
Nov 6 '16 at 10:58
I was requesting an automated method.
– Tim
Nov 6 '16 at 10:58
9
9
this is a better solution than read foreign python3 script before executing it... worked perfectly
– Max
Aug 28 '17 at 12:06
this is a better solution than read foreign python3 script before executing it... worked perfectly
– Max
Aug 28 '17 at 12:06
This is a good answer! Worked perfectly for me too
– haksayng
Nov 6 '17 at 17:02
This is a good answer! Worked perfectly for me too
– haksayng
Nov 6 '17 at 17:02
1
1
Can you delete "duplicates" which have a different type? For example I have
http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu xenial main and http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu xenial main (source code). Is it save to remove the (source code) one (this one isn't checked either, as opposed to the other one)?– Deruijter
Mar 1 '18 at 10:02
Can you delete "duplicates" which have a different type? For example I have
http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu xenial main and http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu xenial main (source code). Is it save to remove the (source code) one (this one isn't checked either, as opposed to the other one)?– Deruijter
Mar 1 '18 at 10:02
@Deruijter: Could you please open a new question if you have a new or follow-up question? The comment section is not suitable or meant for new questions or extended discussion. You’re welcome to send me a comment with a notification to draw my attention to it. Thanks.
– David Foerster
Jun 13 '18 at 18:07
@Deruijter: Could you please open a new question if you have a new or follow-up question? The comment section is not suitable or meant for new questions or extended discussion. You’re welcome to send me a comment with a notification to draw my attention to it. Thanks.
– David Foerster
Jun 13 '18 at 18:07
add a comment |
Reset your repositories like this
sudo rm /etc/apt/sources.listsudo software-properties-gtk- Pick your options
- Save
(P.S. I had the same problem today after updating Ubuntu 15.10 to Ubuntu 16.04.)
add a comment |
Reset your repositories like this
sudo rm /etc/apt/sources.listsudo software-properties-gtk- Pick your options
- Save
(P.S. I had the same problem today after updating Ubuntu 15.10 to Ubuntu 16.04.)
add a comment |
Reset your repositories like this
sudo rm /etc/apt/sources.listsudo software-properties-gtk- Pick your options
- Save
(P.S. I had the same problem today after updating Ubuntu 15.10 to Ubuntu 16.04.)
Reset your repositories like this
sudo rm /etc/apt/sources.listsudo software-properties-gtk- Pick your options
- Save
(P.S. I had the same problem today after updating Ubuntu 15.10 to Ubuntu 16.04.)
edited Nov 24 '17 at 18:42
Tim
19.6k1484139
19.6k1484139
answered Jun 4 '16 at 2:51
AndrewAndrew
95948
95948
add a comment |
add a comment |
I encountered this for 18.10. I used Synaptic to check the repositories and then deleted the ones I thought were duplicates. Result: no more error messages.
add a comment |
I encountered this for 18.10. I used Synaptic to check the repositories and then deleted the ones I thought were duplicates. Result: no more error messages.
add a comment |
I encountered this for 18.10. I used Synaptic to check the repositories and then deleted the ones I thought were duplicates. Result: no more error messages.
I encountered this for 18.10. I used Synaptic to check the repositories and then deleted the ones I thought were duplicates. Result: no more error messages.
answered Dec 24 '18 at 4:39
rob grunerob grune
538149
538149
add a comment |
add a comment |
protected by Thomas Ward♦ Dec 1 '16 at 23:31
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?
1
Wow... You have a worse case of this than I have...
– user364819
Apr 22 '16 at 22:24
I've run at least 100 16.04 VMs (of daily-build tests, Betas and Alphas) and I've had this issue in all of them...
– user364819
Apr 22 '16 at 22:28
2
Possible duplicate of how to fix error W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:2 and /etc/apt/sources.list:5
– muru
Apr 22 '16 at 22:29
2
@muru This question is asking for an automated way.
– Tim
Apr 22 '16 at 22:35
1
Same problem here, ubuntu 16.04 Desktop I had changed repositories to Main Server, after problems arose with my normal repository channel. I usually use mirror.math.ucdavis.edu/ubuntu, and I changed back to that ucdavis repository, All fixed, is that an "automatic enough" response? good luck
– Douglas
Dec 1 '16 at 18:24