1

I recently updated to 20.10 and am having numerous problems, but the first being, I cant update apt. every time i try i get

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:2
W: Target Packages (main/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:2
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:2
W: Target Translations (main/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:2
W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:2
W: Target DEP-11 (main/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:2
W: Target DEP-11 (main/dep11/Components-all.yml) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:2
W: Target DEP-11-icons-small (main/dep11/icons-48x48.tar) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:2
W: Target DEP-11-icons (main/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:2
W: Target DEP-11-icons-hidpi (main/dep11/[email protected]) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:2
W: Target CNF (main/cnf/Commands-amd64) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:2
W: Target CNF (main/cnf/Commands-all) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:2
W: Target Packages (restricted/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:2
W: Target Packages (restricted/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:2
W: Target Packages (restricted/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:2
W: Target Translations (restricted/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:2
W: Target Translations (restricted/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:2
W: Target DEP-11 (restricted/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:2
W: Target DEP-11 (restricted/dep11/Components-all.yml) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:2
W: Target DEP-11-icons-small (restricted/dep11/icons-48x48.tar) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:2
W: Target DEP-11-icons (restricted/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:2
W: Target DEP-11-icons-hidpi (restricted/dep11/[email protected]) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:2
W: Target CNF (restricted/cnf/Commands-amd64) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:2
W: Target CNF (restricted/cnf/Commands-all) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:2

So i checked my /etc/apt/sources.list file and after the upgrade i now have three of them, every one completely different from the next. I don't know which one is correct and if i should remove them or combine them. my sources.list file looks like...

deb http://archive.ubuntu.com/ubuntu groovy main universe restricted multiverse
deb http://archive.ubuntu.com/ubuntu groovy main restricted # auto generated by ubuntu-release-upgrader
deb http://archive.ubuntu.com/ubuntu groovy-updates restricted multiverse main universe # auto generated by ubuntu-release-upgrader
deb http://security.ubuntu.com/ubuntu groovy-security restricted multiverse main universe # auto generated by ubuntu-release-upgrader
deb http://archive.ubuntu.com/ubuntu groovy-backports universe multiverse main restricted

my sources.list #2 looks like...

# deb cdrom:[Ubuntu 20.04.1 LTS _Focal Fossa_ - Release amd64 (20200731)]/ focal main restricted
deb-src http://archive.ubuntu.com/ubuntu focal main restricted #Added by software-properties

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://us.archive.ubuntu.com/ubuntu/ focal main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ focal main multiverse restricted universe #Added by software-properties

## Major bug fix updates produced after the final release of the
## distribution.
deb http://us.archive.ubuntu.com/ubuntu/ focal-updates main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ focal-updates main multiverse restricted universe #Added by software-properties

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://us.archive.ubuntu.com/ubuntu/ focal universe
# deb-src http://us.archive.ubuntu.com/ubuntu/ focal universe
deb http://us.archive.ubuntu.com/ubuntu/ focal-updates universe
# deb-src http://us.archive.ubuntu.com/ubuntu/ focal-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu 
## team, and may not be under a free licence. Please satisfy yourself as to 
## your rights to use the software. Also, please note that software in 
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://us.archive.ubuntu.com/ubuntu/ focal multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ focal multiverse
deb http://us.archive.ubuntu.com/ubuntu/ focal-updates multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ focal-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://us.archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse #Added by software-properties

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
deb http://archive.canonical.com/ubuntu focal partner
deb-src http://archive.canonical.com/ubuntu focal partner

deb http://security.ubuntu.com/ubuntu focal-security main restricted
deb-src http://security.ubuntu.com/ubuntu focal-security main multiverse restricted universe #Added by software-properties
deb http://security.ubuntu.com/ubuntu focal-security universe
# deb-src http://security.ubuntu.com/ubuntu focal-security universe
deb http://security.ubuntu.com/ubuntu focal-security multiverse
# deb-src http://security.ubuntu.com/ubuntu focal-security multiverse

# 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://us.archive.ubuntu.com/ubuntu/ focal-proposed multiverse main restricted universe

My sources.list file #3

# deb cdrom:[Ubuntu 20.04.1 LTS _Focal Fossa_ - Release amd64 (20200731)]/ focal main restricted
deb-src http://archive.ubuntu.com/ubuntu focal main restricted #Added by software-properties

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://us.archive.ubuntu.com/ubuntu/ focal main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ focal main multiverse restricted universe #Added by software-properties

## Major bug fix updates produced after the final release of the
## distribution.
deb http://us.archive.ubuntu.com/ubuntu/ focal-updates main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ focal-updates main multiverse restricted universe #Added by software-properties

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://us.archive.ubuntu.com/ubuntu/ focal universe
# deb-src http://us.archive.ubuntu.com/ubuntu/ focal universe
deb http://us.archive.ubuntu.com/ubuntu/ focal-updates universe
# deb-src http://us.archive.ubuntu.com/ubuntu/ focal-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu 
## team, and may not be under a free licence. Please satisfy yourself as to 
## your rights to use the software. Also, please note that software in 
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://us.archive.ubuntu.com/ubuntu/ focal multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ focal multiverse
deb http://us.archive.ubuntu.com/ubuntu/ focal-updates multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ focal-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://us.archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse #Added by software-properties

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
deb http://archive.canonical.com/ubuntu focal partner
deb-src http://archive.canonical.com/ubuntu focal partner

deb http://security.ubuntu.com/ubuntu focal-security main restricted
deb-src http://security.ubuntu.com/ubuntu focal-security main multiverse restricted universe #Added by software-properties
deb http://security.ubuntu.com/ubuntu focal-security universe
# deb-src http://security.ubuntu.com/ubuntu focal-security universe
deb http://security.ubuntu.com/ubuntu focal-security multiverse
# deb-src http://security.ubuntu.com/ubuntu focal-security multiverse

# 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://us.archive.ubuntu.com/ubuntu/ focal-proposed multiverse main restricted universe

i have no idea how to fix this, what i should comment out, what should be there and what should not. I'm thinking i need to combine and remove, but which ones? how do i fix this so i can properly update and upgrade my repo's?

ToxicTech
  • 11
  • 1

1 Answers1

1

Firstly, based on your comment, the second two have tildes appended to their filenames, which means they're backups and not actually in use.

The error message says /etc/apt/sources.list:1 and /etc/apt/sources.list:2. The colons here are a conventional way of writing line numbers. So the problem seems to be on lines 1 and 2 in sources.list:

deb http://archive.ubuntu.com/ubuntu groovy main universe restricted multiverse
deb http://archive.ubuntu.com/ubuntu groovy main restricted # auto generated by ubuntu-release-upgrader

Here, the words after groovy are a list of repositories. The problem seems to be that the main and restricted repositories are listed twice. So simply comment out line 2, and that should fix the problem.

deb http://archive.ubuntu.com/ubuntu groovy main universe restricted multiverse
# deb http://archive.ubuntu.com/ubuntu groovy main restricted # auto generated by ubuntu-release-upgrader
...

I don't know how this happened.

wjandrea
  • 14,109
  • 4
  • 48
  • 98
  • After doing so, it will save the file as a different sources.list file, correct? So i need to remove the original sources.list file? – ToxicTech Jan 25 '21 at 00:06
  • that worked great, thank you wjandrea! I was able to update, however i belive its still trying to source from sources.list~ and sources.list~~ because after updating i'm getting – ToxicTech Jan 25 '21 at 00:13
  • @Toxic I'm not sure what you mean about removing the original. If you're really not sure what you're doing, run `gedit admin:///etc/apt/sources.list`, edit it, and save it like you normally would. – wjandrea Jan 25 '21 at 00:14
  • ok, i used emacs to edit it and save. thats why i asked, because emacs usually replicates the file with the changes saved as another sources.list file. – ToxicTech Jan 25 '21 at 00:17
  • This is the warning i'm getting after updating. Failed to fetch https://esm.ubuntu.com/infra/ubuntu/dists/focal-infra-updates/InRelease The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 4067E40313CB4B13 W: Some index files failed to download. They have been ignored, or old ones used instead. – ToxicTech Jan 25 '21 at 00:18
  • @Toxic That seems to be a very similar issue since it mentions "focal" instead of "groovy', but I'm not familiar with ESM so I'm not sure what's going on there. Please ask a new question, referencing this one. – wjandrea Jan 25 '21 at 00:25
  • im new to stackExchange, how do i properly reference this question so that it creates a link? sorry for so many questions. – ToxicTech Jan 25 '21 at 00:33
  • @Toxic No worries! There's a little "Share" button under the question you can click to get a link. – wjandrea Jan 25 '21 at 00:41