I have something wonky with my sources list after a dist-upgrade from Xubuntu 18.04.5 to 20.04.1. If I do 'sudo apt update' or install/remove a package from a terminal the command ends with about 20 lines of error messages, all of which look like:
Each of the lines repeats the list:4 and list:37 parts. I looked at the sources.list file with nano and I couldn't see any duplications orCode:W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:4 and /etc/apt/sources.list:37
anything else that looked wrong.
Duckduckgo found me this:
https://askubuntu.com/questions/7608...multiple-times
But I'm not sure which of the many scripts and solutions discussed there are appropriate. And on the upgrade forum sticky I found reference to the repogen page for creating a new sources.list file, but the drop-down list only goes up to 18.04 - no 20.04.
Here is my current /etc/apt/sources.list (edited to remove most of the comments):
deb http://archive.ubuntu.com/ubuntu focal main restricted
deb-src http://archive.ubuntu.com/ubuntu focal restricted main multiverse universe #Added by software-properties
deb http://archive.ubuntu.com/ubuntu focal universe
deb http://archive.ubuntu.com/ubuntu focal multiverse
## 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 [arch=amd64] https://download.virtualbox.org/virtualbox/debian focal contrib # disabled on upgrade to focal
deb http://archive.ubuntu.com/ubuntu focal main restricted # auto generated by ubuntu-release-upgrader
deb http://security.ubuntu.com/ubuntu focal-security universe main restricted multiverse # auto generated by ubuntu-release-upgrader
I should add that the very last line is actually line 37, because of the intervening comment lines that I deleted here. So as my first try at a fix I commented it out, then ran 'sudo apt update' again, but I got the same lines of errors. I also tried commenting only line 4, but that didn't help either.
Meantime, the upgraded computer runs fine - just a couple little appearance problems left to fix. And I can use apt or Synaptic to install/reinstall/remove packages, which works fine, but always ends with the ~20 lines of W: error messages.
There must be some duplicates in my sources.list, but I can't see them. I could use some suggestions.
Bookmarks