Here, it means, the repository is for binary packages, which are hosted in http://archive.ubuntu.com/ubuntu and this repository is for Ubuntu precise (12.04) and this repository contains the main (software which are officially supported by Canonical) component.

Type: The type can be deb and deb-src. deb means a binary repository where deb-src means a source repository

Location:http://archive.ubuntu.com/ubuntu location of the repository.

Dist-name: The distribution name of Ubuntu release. For Ubuntu 12.04 it is precise, for 11.10 it is oneiric.

Component: It can be main, universe, multiverse and restricted. These words indicates the level of supports for the packages and the licensing status.

Please take note that, you can add one or more component in a line, so "main", "universe", "restricted" and "multiverse" can be in a single line. Also note, Though you add more than one component in a single line, APT system considers them as seperate line containing only one component.

So, If your sources.list have a line like this

deb http://archive.ubuntu.com/ubuntu precise universe

Then it can't have another line like the below (which your files have)

Select Canonical partner and Intependent catagory from Other software tab.

That's it. You have now a default sources.list file without error. Compare this file with the previous one, if you want.

Update to deal with sources.list.d dir's files

Sometimes a duplicate entry can be in a file in the /etc/apt/sources.list.d directory, which is also used byt APT. So, you should look at that directory and see if there is any duplicate in those files. It is not necessary for duplicats being in the same file.

Example case:

A user had this error message showing while doing sudo apt-get update.

The files google-chrome.list and google.list looked promising for containing duplicates. So, investing the content of both files were necessary

Output of cat /etc/apt/sources.list.d/google-chrome.list:

deb http://dl.google.com/linux/chrome/deb/ stable main

and of cat /etc/apt/sources.list.d/google.list

deb http://dl.google.com/linux/chrome/deb/ stable main

So, there was a duplicate entries in the sources of Apt. Since google-chrome.list only contain a single apt line and it was also listed in google.list file we can safely remove this file with the command

cat reads the file and passes the content to perl which will remove the duplicate lines. The result will be saved > in a temporary file which will then be moved to replace the original /etc/apt/sources.list file.

How bad are duplicate entries in sources.list?

I don’t know how bad it is, but i don’t like sudo apt-get update showing me duplicate entries.

By the way its not that bad, its just showing you that you have duplicate entries.

SourcesList

The sources.list file is a key factor in adding or upgrading applications to your Ubuntu installation. This is also used by your system for system updates. The file is basically the roadmap for your system to know where it may download programs for installation or upgrade.

In my case, Y PPA kept saying no duplicates found. I made a backup of the source.list removed it, and ran sudo apt-get update to recreate the source list (ubuntu 12.04). This worked for me.
–
michel.iamitJul 5 '13 at 8:27

Left-click on settings icon (at the extreme top corner of your screen) and select System Settings.

Click on Software Sources and move to Other Software.

Uncheck one of the 'Canonical Partners(Source Code) -software packaged by Canonical for their partners' files and one of the 'Canonical Partners -software packaged by Canonical for their partners' files also and click Close to leave.

It sounds like you have two identical lines in your /etc/apt/sources.list file.

Go to terminal, and enter sudo editor /etc/apt/sources.list, then look for any identical lines in that file, and if you find them, delete them. After your done, save and exit, and then do sudo apt-get update and that should resolve your problem.

If that doesn't solve your problem then you're going to have to use the trail and error approach. First, create a backup of your sources.list file, then in the actual file go through and comment out or delete each line, saving and apt-get update-ing after each line has been commented out or deleted. Going through this file line by line commenting out different lines will eventually tell you which line is the superfluous one. Don't forget to uncomment any lines you commented if apt-get update still shows the same prompt, otherwise you'll be left with no sources in your sources.list file.

I try to complete the possibilities offered from other users using terminal, since that's what you asked, mainly:

login if you're using a text based install or

Press alt+f2 and digit gnome-terminal if you're using GUI

once there digit

sudo nano /etc/apt/sources.list

(To understand better: in the folder /etc you can find (nearly) all configuration files of your computer and in the apt folder you find the souces.list file that contains all the repositories that apt-get uses to update or install and upgrade software)

edit visually the file removing or commenting with # the duplicated rows.

Press control + x to exit and choose y to save the file n to quit without saving.

No, there isn't a single command line to find and delete duplicated entries in the /etc/apt/sources.list file.

This is because the suggested command lines, which merely duplicate the function of the much simpler built-in uniq command, will only work on a SORTED file and will only remove ADJACENT lines.
Furthermore, those commands will only remove lines consisting of an identical string of characters.

Duplicate entries reported by apt-get update will consist of duplicate function entries, such as a repository being included in both its i386 and amd64 variants. The easy and effective way to remove these is to note which repositories are reported as duplicates by apt-get update and remove them via the Software Center. Open it and choose Edit -> Software Sources -> Other Software tab. Simply look for the duplicate entries and uncheck them. (This is also an opportunity to remove any source-code repositories if you're not compiling the packages).

However, it should be noted that apt-get update doesn't only find duplicate entries via sources.list, but includes repository files located in /var/lib/apt/lists/. Deleting duplicate entries from there will only temporarily remove the apt-get update error messages if Ubuntu thinks it needs them, as the files will be automatically re-installed. The fact that apt-get update will report some repositories as duplicates, and then suggest that that you run apt-get update itself to repair them, is a clue that you really don't need to worry about that error message.

Please explain the answer or risk having it removed.
–
jokerdino♦Jul 4 '12 at 4:55

Welcome to Ask Ubuntu! As jokerdino as indicated, this answer would benefit substantially, if you were to edit it to add some explanation (or at least to tell the user exactly what to do with these lines).
–
Eliah KaganJul 4 '12 at 10:34

This answer is wrong because it may does remove duplicate entries but it does not remove duplicate source entries. see here for an explanation
–
Anwar ShahSep 6 '12 at 5:26