Results 1 to 4 of 4

Thread: 18.04.5 > 20.04.1 caused duplications in sources.list

  1. #1
    Join Date
    Jun 2005
    Location
    Portland, left
    Beans
    1,239
    Distro
    Xubuntu 22.04 Jammy Jellyfish

    18.04.5 > 20.04.1 caused duplications in sources.list

    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:

    Code:
    W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:4 and /etc/apt/sources.list:37
    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 or
    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.
    Linguistics on Linux!

  2. #2
    Join Date
    Apr 2011
    Location
    Mystletainn Kick!
    Beans
    13,616
    Distro
    Ubuntu

    Re: 18.04.5 > 20.04.1 caused duplications in sources.list

    The first line and the second to last line are the same:

    Code:
    deb http://archive.ubuntu.com/ubuntu focal main restricted
    
    deb http://archive.ubuntu.com/ubuntu focal main restricted # auto generated by ubuntu-release-upgrader
    I've struck through the unimportant part of the second line, as it has no bearing on the entry.
    Splat Double Splat Triple Splat
    Earn Your Keep
    Don't mind me, I'm only passing through.
    Once in a blue moon, I'm actually helpful
    .

  3. #3
    Join Date
    Jun 2005
    Location
    Portland, left
    Beans
    1,239
    Distro
    Xubuntu 22.04 Jammy Jellyfish

    Re: 18.04.5 > 20.04.1 caused duplications in sources.list

    @deadflowr

    Thanks a bunch. Problem solved. I don't know why I couldn't see that. I also don't know why the error messages complained about lines 4 and 37 when the problem was really in lines 2 and 36. Oh well.
    Linguistics on Linux!

  4. #4
    Join Date
    Apr 2011
    Location
    Mystletainn Kick!
    Beans
    13,616
    Distro
    Ubuntu

    Re: 18.04.5 > 20.04.1 caused duplications in sources.list

    I don't know why I couldn't see that.
    I think the extra stuff at the end of the second entry makes it easy to dismiss it.
    Splat Double Splat Triple Splat
    Earn Your Keep
    Don't mind me, I'm only passing through.
    Once in a blue moon, I'm actually helpful
    .

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •