Duplicate sources.list entry

Asked by Wesley Michael

When I run "apt-get update" I am getting the following error:

W: Duplicate sources.list entry http://archive.canonical.com/ubuntu/ lucid/partner Packages (/var/lib/apt/lists/archive.canonical.com_ubuntu_dists_lucid_partner_binary-i386_Packages)
W: You may want to run apt-get update to correct these problems

I have checked the /etc/apt/sources.list file and there aren't any duplicates it in. However, in the file /etc/apt/sources.list.d/lucid-partner.list, I found the line:

deb http://archive.canonical.com/ubuntu lucid partner

Which is a match to a line in the /etc/apt/sources.list file. I commented out the line in the lucid-partners.list file and now the "apt-get update" command completes without and error.

My question is simple: did I do the right thing, or is this a symptom of something else?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu apt Edit question
Assignee:
No assignee Edit question
Solved by:
mycae
Solved:
Last query:
Last reply:
Revision history for this message
Best mycae (mycae) said :
#1

yes, you did the right thing. apt is moving from a single sources.list file into multiple sources.list files inside sources.list.d. I probably would have done it the other way around, but there is no harm in the way you have done it.

Revision history for this message
Wesley Michael (wam-zoominternet) said :
#2

Thanks. I took your advice and removed the line from sources.list and put it back into lucid-partner.list

Revision history for this message
adonios77 (adonios77) said :
#3

Can you tell me please how to modify and save this file?
I try to modify it with emacs but says The file is "write protected" and dont let me to save it.
sorry for my english

Revision history for this message
Wesley Michael (wam-zoominternet) said :
#4

sudo gedit /etc/apt/sources.list.d/lucid-partner.list
sudo gedit /etc/apt/sources.list

Revision history for this message
adonios77 (adonios77) said :
#5

Ok! Ifind the way!
R.click on the file and choose "open as administrator"