I can't remove duplicate repositories ubuntu 14.04

Asked by vishal

W: Duplicate sources.list entry http://in.archive.ubuntu.com/ubuntu/ trusty-backports/multiverse i386 Packages (/var/lib/apt/lists/in.archive.ubuntu.com_ubuntu_dists_trusty-backports_multiverse_binary-i386_Packages)
W: You may want to run apt-get update to correct these problems
I upgraded my laptop from 12.04 to 14.04 and i tried to update my repositiories i found the above message in the terminal , i googled the problem and found that they are duplicate repositories , then I went to 'software & updates' and indeed found duplicate entries one source and the other normal , i selected the other ones but here the remove button doesn't get activated at all, the i tried to install y-ppa manager added repository but install failed , synaptic manager takes to the same place where I had been earlier where in 'Remove' doesn't work. Kindly help
Thank you

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Manfred Hampl
Solved:
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

wget https://dl.dropbox.com/u/8850924/fixpackage
chmod +x ./fixpackage
sudo ./fixpackage

Should do it.

Revision history for this message
vishal (zvesda1) said :
#2

Thank you for the reply but I copy pasted the above in terminal and ran it , then i did the update I still got
W: Duplicate sources.list entry http://in.archive.ubuntu.com/ubuntu/ trusty-backports/multiverse i386 Packages (/var/lib/apt/lists/in.archive.ubuntu.com_ubuntu_dists_trusty-backports_multiverse_binary-i386_Packages)
W: You may want to run apt-get update to correct these problems

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#3

What is the output of :

grep multiverse /etc/apt/sources.list

Thanks

Revision history for this message
Manfred Hampl (m-hampl) said :
#4

What is the output of the terminal command

find /etc/apt -name '*.list' -exec bash -c 'echo -e "\n$1\n"; cat -n "$1"' _ '{}' \;

Revision history for this message
vishal (zvesda1) said :
#5

Hi my apologies for the delay
for grep multiverse/etc/apt/sources.list
I got the following output
## multiverse WILL NOT receive any review or updates from the Ubuntu
deb http://in.archive.ubuntu.com/ubuntu/ trusty multiverse
deb-src http://in.archive.ubuntu.com/ubuntu/ trusty multiverse
deb http://in.archive.ubuntu.com/ubuntu/ trusty-updates multiverse
deb-src http://in.archive.ubuntu.com/ubuntu/ trusty-updates multiverse
deb http://security.ubuntu.com/ubuntu trusty-security multiverse
deb-src http://security.ubuntu.com/ubuntu trusty-security multiverse
deb http://in.archive.ubuntu.com/ubuntu/ trusty-backports restricted main multiverse universe
deb http://in.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://in.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse

Revision history for this message
vishal (zvesda1) said :
#6

for : find /etc/apt -name '*.list' -exec bash -c 'echo -e "\n$1\n"; cat -n "$1"' _ '{}' \;
I got the following output:

/etc/apt/sources.list

     1 # deb cdrom:[Ubuntu 14.04.1 LTS _Trusty Tahr_ - Release amd64 (20140722.2)]/ trusty main restricted
     2 # deb cdrom:[Ubuntu 12.04 LTS _Precise Pangolin_ - Release i386 (20120423)]/ trusty main restricted
     3
     4 # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
     5 # newer versions of the distribution.
     6 deb http://in.archive.ubuntu.com/ubuntu/ trusty main restricted
     7 deb-src http://in.archive.ubuntu.com/ubuntu/ trusty main restricted
     8 ## Major bug fix updates produced after the final release of the
     9 ## distribution.
    10 deb http://in.archive.ubuntu.com/ubuntu/ trusty-updates main restricted
    11 deb-src http://in.archive.ubuntu.com/ubuntu/ trusty-updates main restricted
    12 ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
    13 ## team. Also, please note that software in universe WILL NOT receive any
    14 ## review or updates from the Ubuntu security team.
    15 deb http://in.archive.ubuntu.com/ubuntu/ trusty universe
    16 deb-src http://in.archive.ubuntu.com/ubuntu/ trusty universe
    17 deb http://in.archive.ubuntu.com/ubuntu/ trusty-updates universe
    18 deb-src http://in.archive.ubuntu.com/ubuntu/ trusty-updates universe
    19 ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
    20 ## team, and may not be under a free licence. Please satisfy yourself as to
    21 ## your rights to use the software. Also, please note that software in
    22 ## multiverse WILL NOT receive any review or updates from the Ubuntu
    23 ## security team.
    24 deb http://in.archive.ubuntu.com/ubuntu/ trusty multiverse
    25 deb-src http://in.archive.ubuntu.com/ubuntu/ trusty multiverse
    26 deb http://in.archive.ubuntu.com/ubuntu/ trusty-updates multiverse
    27 deb-src http://in.archive.ubuntu.com/ubuntu/ trusty-updates multiverse
    28 ## N.B. software from this repository may not have been tested as
    29 ## extensively as that contained in the main release, although it includes
    30 ## newer versions of some applications which may provide useful features.
    31 ## Also, please note that software in backports WILL NOT receive any review
    32 ## or updates from the Ubuntu security team.
    33 deb http://security.ubuntu.com/ubuntu trusty-security main restricted
    34 deb-src http://security.ubuntu.com/ubuntu trusty-security main restricted
    35 deb http://security.ubuntu.com/ubuntu trusty-security universe
    36 deb-src http://security.ubuntu.com/ubuntu trusty-security universe
    37 deb http://security.ubuntu.com/ubuntu trusty-security multiverse
    38 deb-src http://security.ubuntu.com/ubuntu trusty-security multiverse
    39 ## Uncomment the following two lines to add software from Canonical's
    40 ## 'partner' repository.
    41 ## This software is not part of Ubuntu, but is offered by Canonical and the
    42 ## respective vendors as a service to Ubuntu users.
    43 ## This software is not part of Ubuntu, but is offered by third-party
    44 ## developers who want to ship their latest software.
    45 deb http://in.archive.ubuntu.com/ubuntu/ trusty-backports restricted main multiverse universe
    46 deb http://in.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse
    47 deb-src http://in.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse

/etc/apt/sources.list.d/webupd8team-y-ppa-manager-trusty.list

Revision history for this message
Best Manfred Hampl (m-hampl) said :
#7

Open a terminal and issue the command

sudo gedit /etc/apt/sources.list
this should ask for your password as confirmation for an administrative action, and then open an editor with the sources.list configuration file loaded.
Scroll down to the end of the file, and then go up three lines.
Delete line 45 (deb http://in.archive.ubuntu.com/ubuntu/ trusty-backports restricted main multiverse universe)
Save the file and close the editor.

Finally try
sudo apt-get update
again, to verify if the problem is solved.

Revision history for this message
vishal (zvesda1) said :
#8

Thanks Manfred Hampl, that solved my question.

Revision history for this message
vishal (zvesda1) said :
#9

Thanks to @actionparnsip