Score:0

I am keep getting warning message when doing "sudo apt-get update". I was trying to do update in kubernetes cluster. How can I resolve it?

cn flag

root@gpus:/home/gpus# apt-get update

Hit:2 https://repo.download.nvidia.com/baseos/ubuntu/focal/x86_64 focal InRelease                                                                
Get:1 https://packages.cloud.google.com/apt kubernetes-xenial InRelease [9,383 B]                                                                
Hit:4 https://baltocdn.com/helm/stable/debian all InRelease                                                                 
Ign:5 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64  InRelease
Hit:6 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64  Release
Get:8 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]
Hit:9 http://us.archive.ubuntu.com/ubuntu focal InRelease
Get:10 http://us.archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
Fetched 237 kB in 3s (87.3 kB/s)                                    
Reading package lists... Done
W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:4 and /etc/apt/sources.list.d/kubernetes.list:1
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:4 and /etc/apt/sources.list.d/kubernetes.list:1
W: Target Translations (main/i18n/Translation-en_IN) is configured multiple times in /etc/apt/sources.list:4 and /etc/apt/sources.list.d/kubernetes.list:1
W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:4 and /etc/apt/sources.list.d/kubernetes.list:1
W: Target CNF (main/cnf/Commands-amd64) is configured multiple times in /etc/apt/sources.list:4 and /etc/apt/sources.list.d/kubernetes.list:1
W: Target CNF (main/cnf/Commands-all) is configured multiple times in /etc/apt/sources.list:4 and /etc/apt/sources.list.d/kubernetes.list:1
W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:4 and /etc/apt/sources.list.d/kubernetes.list:1
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:4 and /etc/apt/sources.list.d/kubernetes.list:1
W: Target Translations (main/i18n/Translation-en_IN) is configured multiple times in /etc/apt/sources.list:4 and /etc/apt/sources.list.d/kubernetes.list:1
W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:4 and /etc/apt/sources.list.d/kubernetes.list:1
W: Target CNF (main/cnf/Commands-amd64) is configured multiple times in /etc/apt/sources.list:4 and /etc/apt/sources.list.d/kubernetes.list:1
W: Target CNF (main/cnf/Commands-all) is configured multiple times in /etc/apt/sources.list:4 and /etc/apt/sources.list.d/kubernetes.list:1

photo of text I attached the screenshot of command: cat /etc/apt/sources.list

cn flag
Please remove the duplicate from your sources.list
Nmath avatar
ng flag
The errors are telling you that your sources are messed up. It appears that you have duplicates. Audit the files `/etc/apt/sources.list` as well as any other `.list` files under the directory `/etc/apt` (including subdirectories)
Gangadhar Singh avatar
cn flag
Thank you for the suggestions. I added my /etc/apt/sources.list file in the question post. But I am unable to decide which one to remove.
Nmath avatar
ng flag
Please do not submit pictures of text, especially without any identification of where it came from. Instead, copy/paste into the body of your question and use [code fences](https://askubuntu.com/editing-help#code). Please be sure to identify where the text comes from: if it is a file, give us the whole path; if it is the output of a command, provide the command. It's best if you provide complete information and not bits and pieces.
pLumo avatar
in flag
Run `sudo sed -i '/kubernetes/d' /etc/apt/sources.list` and see if its working then.
karel avatar
sa flag
Does this answer your question? [How can I fix apt error "W: Target Packages ... is configured multiple times"?](https://askubuntu.com/questions/760896/how-can-i-fix-apt-error-w-target-packages-is-configured-multiple-times)
Gangadhar Singh avatar
cn flag
Yes karel, but I don't get it how it resolve my issue. A little explanation will be of great help. Thanks again for the help.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.