[Software] apt warnings about "Target is defined multiple times"

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
tmick
Posts: 53
Joined: 2012-05-27 21:31
Has thanked: 5 times

[Software] apt warnings about "Target is defined multiple times"

#1 Post by tmick »

Hi All,
I know this is a "dumb question" however; when I run

Code: Select all

 apt update 
or

Code: Select all

apt-get update 
I get a bunch of these warnings:

Code: Select all

W: Target Packages (main/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list:15 and /etc/apt/sources.list:25
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:15 and /etc/apt/sources.list:25
W: Target Translations (main/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list:15 and /etc/apt/sources.list:25
W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:15 and /etc/apt/sources.list:25
W: Target DEP-11 (main/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list:15 and /etc/apt/sources.list:25
W: Target DEP-11 (main/dep11/Components-all.yml) is configured multiple times in /etc/apt/sources.list:15 and /etc/apt/sources.list:25
W: Target DEP-11-icons-small (main/dep11/icons-48x48.tar) is configured multiple times in /etc/apt/sources.list:15 and /etc/apt/sources.list:25
W: Target DEP-11-icons (main/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list:15 and /etc/apt/sources.list:25
W: Target Contents-deb (main/Contents-amd64) is configured multiple times in /etc/apt/sources.list:15 and /etc/apt/sources.list:25
W: Target Contents-deb (main/Contents-i386) is configured multiple times in /etc/apt/sources.list:15 and /etc/apt/sources.list:25
W: Target Contents-deb (main/Contents-all) is configured multiple times in /etc/apt/sources.list:15 and /etc/apt/sources.list:25
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
All packages are up to date.
N: Skipping acquire of configured file 'main/binary-i386/Packages' as repository 'file:/var/cache/apt-build/repository apt-build InRelease' doesn't support architecture 'i386'
W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:15 and /etc/apt/sources.list:25
W: Target Packages (main/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list:15 and /etc/apt/sources.list:25
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:15 and /etc/apt/sources.list:25
W: Target Translations (main/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list:15 and /etc/apt/sources.list:25
W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:15 and /etc/apt/sources.list:25
W: Target DEP-11 (main/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list:15 and /etc/apt/sources.list:25
W: Target DEP-11 (main/dep11/Components-all.yml) is configured multiple times in /etc/apt/sources.list:15 and /etc/apt/sources.list:25
W: Target DEP-11-icons-small (main/dep11/icons-48x48.tar) is configured multiple times in /etc/apt/sources.list:15 and /etc/apt/sources.list:25
W: Target DEP-11-icons (main/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list:15 and /etc/apt/sources.list:25
W: Target Contents-deb (main/Contents-amd64) is configured multiple times in /etc/apt/sources.list:15 and /etc/apt/sources.list:25
W: Target Contents-deb (main/Contents-i386) is configured multiple times in /etc/apt/sources.list:15 and /etc/apt/sources.list:25
W: Target Contents-deb (main/Contents-all) is configured multiple times in /etc/apt/sources.list:15 and /etc/apt/sources.list:25
W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:15 and /etc/apt/sources.list:25
W: Target Packages (main/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list:15 and /etc/apt/sources.list:25
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:15 and /etc/apt/sources.list:25
W: Target Translations (main/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list:15 and /etc/apt/sources.list:25
W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:15 and /etc/apt/sources.list:25
As you can see it's fricken annoying :(
My /etc/apt/sources.list looks like:

Code: Select all

# deb cdrom:[Debian GNU/Linux testing _Bookworm_ - Official Snapshot amd64 NETINST 20220502-15:11]/ bookworm main

# deb cdrom:[Debian GNU/Linux testing _Bookworm_ - Official Snapshot amd64 NETINST 20220502-15:11]/ bookworm main

deb http://deb.debian.org/debian/ testing main contrib non-free
deb-src http://deb.debian.org/debian/ testing main contrib non-free

deb http://security.debian.org/debian-security/ testing-security main contrib non-free
deb-src http://security.debian.org/debian-security/ testing-security main contrib non-free

# Debug pacakges
deb http://deb.debian.org/debian-debug/ testing-debug main

# Firmware updates
deb https://deb.debian.org/debian bookworm main non-free-firmware

# This system was installed using small removable media
# (e.g. netinst, live or single CD). The matching "deb cdrom"
# entries were disabled at the end of the installation process.
# For information about how to configure apt package sources,
# see the sources.list(5) manual.



deb http://deb.debian.org/debian/ bookworm contrib non-free main
deb-src http://deb.debian.org/debian/ bookworm contrib non-free main #Added by software-properties
I can't see where anything is defined multiple time on either line 15 or 25 so how do I clear this up?
Thanks in advance for help.

User avatar
4D696B65
Site admin
Site admin
Posts: 2977
Joined: 2009-06-28 06:09
Been thanked: 53 times

Re: [Software] apt warnings about "Target is defined multiple times"

#2 Post by 4D696B65 »

bookworm is the same as testing at the moment

apt

tmick
Posts: 53
Joined: 2012-05-27 21:31
Has thanked: 5 times

Re: [Software] apt warnings about "Target is defined multiple times"

#3 Post by tmick »

So change the parts that say Bookworm to testing and comment out the firmware update section?

Code: Select all

# Firmware updates
deb https://deb.debian.org/debian bookworm main non-free-firmware
that was done to comply with section 5.1.1 of Bookworm release notes

User avatar
4D696B65
Site admin
Site admin
Posts: 2977
Joined: 2009-06-28 06:09
Been thanked: 53 times

Re: [Software] apt warnings about "Target is defined multiple times"

#4 Post by 4D696B65 »

It depends. Do you want to stay with testing forever or just until bookworm goes stable which will be soon.
Change everything to testing or everything to bookworm. Don't mix the 2 or you will eventually run into trouble.

tmick
Posts: 53
Joined: 2012-05-27 21:31
Has thanked: 5 times

Re: [Software] apt warnings about "Target is defined multiple times"

#5 Post by tmick »

got it, changed everything to testing and commented out the firmware part. I added the file it needs for the firmware.
Output looks like this now:

Code: Select all

# apt update 
Get:1 file:/var/cache/apt-build/repository apt-build InRelease
Ign:1 file:/var/cache/apt-build/repository apt-build InRelease
Get:2 file:/var/cache/apt-build/repository apt-build Release [1,530 B]
Get:2 file:/var/cache/apt-build/repository apt-build Release [1,530 B]
Get:3 file:/var/cache/apt-build/repository apt-build Release.gpg               
Ign:3 file:/var/cache/apt-build/repository apt-build Release.gpg               
Hit:4 http://security.debian.org/debian-security testing-security InRelease    
Hit:5 http://deb.debian.org/debian testing InRelease                           
Hit:6 http://deb.debian.org/debian-debug testing-debug InRelease
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
All packages are up to date.
N: Skipping acquire of configured file 'main/binary-i386/Packages' as repository 'file:/var/cache/apt-build/repository apt-build InRelease' doesn't support architecture 'i386'

I'd remove the i386 architecture if I was sure steam would still work : (

User avatar
wizard10000
Section Moderator
Section Moderator
Posts: 430
Joined: 2019-04-16 23:15
Location: southeastern us
Has thanked: 54 times
Been thanked: 52 times

Re: [Software] apt warnings about "Target is defined multiple times"

#6 Post by wizard10000 »

This was interesting - #Added by software-properties

Below is all you need. Decide whether you want to use testing or change them to bookworm and just use what's below. Everything else is a bit less than necessary and is causing your apt issues :)

Note that I also commented out source repos. No disrespect but if you're not compiling from source there's no reason to have source repos mapped and this will speed up apt updates a tiny bit. Feel free to uncomment if you like.

deb http://deb.debian.org/debian/ testing main contrib non-free non-free firmware
# deb-src http://deb.debian.org/debian/ testing main contrib non-free non-free firmware

deb http://security.debian.org/debian-security/ testing-security main contrib non-free non-free firmware
# deb-src http://security.debian.org/debian-security/ testing-security main contrib non-free non-free firmware
we see things not as they are, but as we are.
-- anais nin

tmick
Posts: 53
Joined: 2012-05-27 21:31
Has thanked: 5 times

Re: [Software] apt warnings about "Target is defined multiple times"

#7 Post by tmick »

Well I added comments to my sources.list and I now get:

Code: Select all

apt-get clean 
DebianTim:~# apt update 
Get:1 file:/var/cache/apt-build/repository apt-build InRelease
Ign:1 file:/var/cache/apt-build/repository apt-build InRelease
Get:2 file:/var/cache/apt-build/repository apt-build Release [1,530 B]
Get:2 file:/var/cache/apt-build/repository apt-build Release [1,530 B]
Get:3 file:/var/cache/apt-build/repository apt-build Release.gpg      
Ign:3 file:/var/cache/apt-build/repository apt-build Release.gpg
Hit:4 http://security.debian.org/debian-security testing-security InRelease
Hit:5 http://deb.debian.org/debian testing InRelease
Get:6 https://deb.debian.org/debian bookworm InRelease [178 kB]
Hit:7 http://deb.debian.org/debian-debug testing-debug InRelease
Get:8 https://deb.debian.org/debian bookworm/main i386 Packages [8,896 kB]
Get:9 https://deb.debian.org/debian bookworm/main amd64 Packages [9,006 kB]
Get:10 https://deb.debian.org/debian bookworm/main Translation-en [6,094 kB]   
Get:11 https://deb.debian.org/debian bookworm/main amd64 DEP-11 Metadata [4,509 kB]
Get:12 https://deb.debian.org/debian bookworm/main DEP-11 48x48 Icons [3,625 kB]
Get:13 https://deb.debian.org/debian bookworm/main DEP-11 64x64 Icons [7,343 kB]
Get:14 https://deb.debian.org/debian bookworm/main amd64 Contents (deb) [11.6 MB]
Get:15 https://deb.debian.org/debian bookworm/main i386 Contents (deb) [11.2 MB]
Get:16 https://deb.debian.org/debian bookworm/main all Contents (deb) [33.3 MB]
Get:17 https://deb.debian.org/debian bookworm/non-free-firmware i386 Packages [5,532 B]
Get:18 https://deb.debian.org/debian bookworm/non-free-firmware amd64 Packages [5,864 B]
Get:19 https://deb.debian.org/debian bookworm/non-free-firmware Translation-en [20.6 kB]
Get:20 https://deb.debian.org/debian bookworm/non-free-firmware amd64 DEP-11 Metadata [15.4 kB]
Get:21 https://deb.debian.org/debian bookworm/non-free-firmware DEP-11 48x48 Icons [29 B]
Get:22 https://deb.debian.org/debian bookworm/non-free-firmware DEP-11 64x64 Icons [29 B]
Get:23 https://deb.debian.org/debian bookworm/non-free-firmware amd64 Contents (deb) [922 B]
Get:24 https://deb.debian.org/debian bookworm/non-free-firmware i386 Contents (deb) [918 B]
Get:25 https://deb.debian.org/debian bookworm/non-free-firmware all Contents (deb) [16.8 kB]
Fetched 95.8 MB in 24s (3,972 kB/s)                                            
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
All packages are up to date.
N: Skipping acquire of configured file 'main/binary-i386/Packages' as repository 'file:/var/cache/apt-build/repository apt-build InRelease' doesn't support architecture 'i386'
Current sources.list =

Code: Select all

# deb cdrom:[Debian GNU/Linux testing _Bookworm_ - Official Snapshot amd64 NETINST 20220502-15:11]/ bookworm main

# deb cdrom:[Debian GNU/Linux testing _Bookworm_ - Official Snapshot amd64 NETINST 20220502-15:11]/ bookworm main

deb http://deb.debian.org/debian/ testing main contrib non-free
#deb-src http://deb.debian.org/debian/ testing main contrib non-free

deb http://security.debian.org/debian-security/ testing-security main contrib non-free
#deb-src http://security.debian.org/debian-security/ testing-security main contrib non-free

# Debug pacakges
deb http://deb.debian.org/debian-debug/ testing-debug main

# Firmware updates
deb https://deb.debian.org/debian bookworm main non-free-firmware

# This system was installed using small removable media
# (e.g. netinst, live or single CD). The matching "deb cdrom"
# entries were disabled at the end of the installation process.
# For information about how to configure apt package sources,
# see the sources.list(5) manual.



#deb http://deb.debian.org/debian/ testing contrib non-free main
#deb-src http://deb.debian.org/debian/ testing contrib non-free main #Added by software-properties

User avatar
wizard10000
Section Moderator
Section Moderator
Posts: 430
Joined: 2019-04-16 23:15
Location: southeastern us
Has thanked: 54 times
Been thanked: 52 times

Re: [Software] apt warnings about "Target is defined multiple times"

#8 Post by wizard10000 »

What I posted was all you need - remove or comment out everything else.
we see things not as they are, but as we are.
-- anais nin

User avatar
stevepusser
Posts: 12694
Joined: 2009-10-06 05:53
Has thanked: 25 times
Been thanked: 37 times

Re: [Software] apt warnings about "Target is defined multiple times"

#9 Post by stevepusser »

Did you ever try using "apt build" to rebuild a Debian package from source? That may have added that folder that's throwing that last line warning?
MX Linux packager and developer

tmick
Posts: 53
Joined: 2012-05-27 21:31
Has thanked: 5 times

Re: [Software] apt warnings about "Target is defined multiple times"

#10 Post by tmick »

Yes I have, psad's dev had me install a patch and recompile it. wonder if I can apt build the entire system ... hmmmm

Post Reply