Software Package Repos Displaying “Duplicates”

SYSTEM INFORMATION
OS type and version Ubuntu Linux 22.04.4
Usermin version 2.102
Virtualmin version 7.20.2 Pro
Theme version 21.20.7
Apache version 2.4.62
Package updates All installed packages are up to date

I applied the patch that Illia suggested in this thread.

When checking the respective page (Webmin > System > Software Package Updates > Package Repositories) they come up like this:

Done a grep ^ /etc/apt/sources.list /etc/apt/sources.list.d/* and it seems it displays everything, so these aren’t real duplicates, I reckon.

Not sure if this is desired outcome/behaviour, but it may confuse when looking at it the first time.

It could be cache, try clearing it.

Unfortunately, clearing the cache has no effect.

I just looked at the apt source files and removed the remmed out duplicates for some and others ticked the ticked the box in the GUI and clicked delete. Running apt from the command line showed no difference after this exercise and worked as expected

You had real duplicates showing up in /etc/apt/sources.list and underneath /etc/apt/sources.list.d/?

Yes there were a few in both areas … some were copies of the actual files but with a .save extension which apt never read but webmin does

Hmm, that’s interesting. So it could be another issue on my side since there are no duplicates in neither locations. Apart from the aforementioned locations, are you aware of any other that I haven’t looked into?

no but do you repros marked with # at the beginning of the line ? this was the source of most of my dups after removing the duplicate files

Can you share the list of all your repos? In particular all files in /etc/apt/sources.list.d and /etc/apt/sources.list file itself?

Maybe it’s just my interpretation of deb and deb-src: Because of the fact that deb-src are only needed if I want to compile on my own, I assume(d) that only deb lines should be considered in this overview since these can be installed via apt.

Anyway, here you go:

/etc/apt/sources.list:## Note, this file is written by cloud-init on first boot of an instance
/etc/apt/sources.list:## modifications made here will not survive a re-bundle.
/etc/apt/sources.list:## if you wish to make changes you can:
/etc/apt/sources.list:## a.) add 'apt_preserve_sources_list: true' to /etc/cloud/cloud.cfg
/etc/apt/sources.list:##     or do the same in user-data
/etc/apt/sources.list:## b.) add sources in /etc/apt/sources.list.d
/etc/apt/sources.list:## c.) make changes to template file /etc/cloud/templates/sources.list.tmpl
/etc/apt/sources.list:
/etc/apt/sources.list:# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
/etc/apt/sources.list:# newer versions of the distribution.
/etc/apt/sources.list:deb http://archive.ubuntu.com/ubuntu jammy main restricted
/etc/apt/sources.list:# deb-src http://archive.ubuntu.com/ubuntu jammy main restricted
/etc/apt/sources.list:
/etc/apt/sources.list:## Major bug fix updates produced after the final release of the
/etc/apt/sources.list:## distribution.
/etc/apt/sources.list:deb http://archive.ubuntu.com/ubuntu jammy-updates main restricted
/etc/apt/sources.list:# deb-src http://archive.ubuntu.com/ubuntu jammy-updates main restricted
/etc/apt/sources.list:
/etc/apt/sources.list:## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
/etc/apt/sources.list:## team. Also, please note that software in universe WILL NOT receive any
/etc/apt/sources.list:## review or updates from the Ubuntu security team.
/etc/apt/sources.list:deb http://archive.ubuntu.com/ubuntu jammy universe
/etc/apt/sources.list:# deb-src http://archive.ubuntu.com/ubuntu jammy universe
/etc/apt/sources.list:deb http://archive.ubuntu.com/ubuntu jammy-updates universe
/etc/apt/sources.list:# deb-src http://archive.ubuntu.com/ubuntu jammy-updates universe
/etc/apt/sources.list:
/etc/apt/sources.list:## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
/etc/apt/sources.list:## team, and may not be under a free licence. Please satisfy yourself as to
/etc/apt/sources.list:## your rights to use the software. Also, please note that software in
/etc/apt/sources.list:## multiverse WILL NOT receive any review or updates from the Ubuntu
/etc/apt/sources.list:## security team.
/etc/apt/sources.list:deb http://archive.ubuntu.com/ubuntu jammy multiverse
/etc/apt/sources.list:# deb-src http://archive.ubuntu.com/ubuntu jammy multiverse
/etc/apt/sources.list:deb http://archive.ubuntu.com/ubuntu jammy-updates multiverse
/etc/apt/sources.list:# deb-src http://archive.ubuntu.com/ubuntu jammy-updates multiverse
/etc/apt/sources.list:
/etc/apt/sources.list:## N.B. software from this repository may not have been tested as
/etc/apt/sources.list:## extensively as that contained in the main release, although it includes
/etc/apt/sources.list:## newer versions of some applications which may provide useful features.
/etc/apt/sources.list:## Also, please note that software in backports WILL NOT receive any review
/etc/apt/sources.list:## or updates from the Ubuntu security team.
/etc/apt/sources.list:deb http://archive.ubuntu.com/ubuntu jammy-backports main restricted universe multiverse
/etc/apt/sources.list:# deb-src http://archive.ubuntu.com/ubuntu jammy-backports main restricted universe multiverse
/etc/apt/sources.list:
/etc/apt/sources.list:deb http://security.ubuntu.com/ubuntu jammy-security main restricted
/etc/apt/sources.list:# deb-src http://security.ubuntu.com/ubuntu jammy-security main restricted
/etc/apt/sources.list:deb http://security.ubuntu.com/ubuntu jammy-security universe
/etc/apt/sources.list:# deb-src http://security.ubuntu.com/ubuntu jammy-security universe
/etc/apt/sources.list:deb http://security.ubuntu.com/ubuntu jammy-security multiverse
/etc/apt/sources.list:# deb-src http://security.ubuntu.com/ubuntu jammy-security multiverse
/etc/apt/sources.list.d/docker.list:deb [arch=amd64 signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu   jammy stable
/etc/apt/sources.list.d/ondrej-ubuntu-apache2-jammy.list:deb https://ppa.launchpadcontent.net/ondrej/apache2/ubuntu/ jammy main
/etc/apt/sources.list.d/ondrej-ubuntu-apache2-jammy.list:# deb-src https://ppa.launchpadcontent.net/ondrej/apache2/ubuntu/ jammy main
/etc/apt/sources.list.d/ondrej-ubuntu-php-jammy.list:deb https://ppa.launchpadcontent.net/ondrej/php/ubuntu/ jammy main
/etc/apt/sources.list.d/ondrej-ubuntu-php-jammy.list:# deb-src https://ppa.launchpadcontent.net/ondrej/php/ubuntu/ jammy main
/etc/apt/sources.list.d/ubuntu-esm-apps.list:deb https://esm.ubuntu.com/apps/ubuntu jammy-apps-security main
/etc/apt/sources.list.d/ubuntu-esm-apps.list:# deb-src https://esm.ubuntu.com/apps/ubuntu jammy-apps-security main
/etc/apt/sources.list.d/ubuntu-esm-apps.list:deb https://esm.ubuntu.com/apps/ubuntu jammy-apps-updates main
/etc/apt/sources.list.d/ubuntu-esm-apps.list:# deb-src https://esm.ubuntu.com/apps/ubuntu jammy-apps-updates main
/etc/apt/sources.list.d/ubuntu-esm-infra.list:deb https://esm.ubuntu.com/infra/ubuntu jammy-infra-security main
/etc/apt/sources.list.d/ubuntu-esm-infra.list:# deb-src https://esm.ubuntu.com/infra/ubuntu jammy-infra-security main
/etc/apt/sources.list.d/ubuntu-esm-infra.list:deb https://esm.ubuntu.com/infra/ubuntu jammy-infra-updates main
/etc/apt/sources.list.d/ubuntu-esm-infra.list:# deb-src https://esm.ubuntu.com/infra/ubuntu jammy-infra-updates main
/etc/apt/sources.list.d/virtualmin.list:deb [signed-by=/usr/share/keyrings/ubuntu-virtualmin-7.gpg] https://software.virtualmin.com/vm/7/pro/apt virtualmin main

Could you please zip the mentioned directory and file, then drag and drop it here?

repos.zip (2.6 KB)

Fixed here:

Patch can be applied as follows:

webmin patch https://github.com/webmin/webmin/commit/9966a2a
1 Like

Thanks, Illia!

Patch applied, cache cleared, server restarted.

This is what it looks now:

When you’re happy with the output, I am too. :wink:

Looks good to me.

1 Like

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.