Search for all packages installed from specific repo

Hi all, we’re still on 4.4 waiting for the dust to settle on 5.x before upgrading, but I’m looking into the blockers. Cool solutions repo is the main one (we use usercert).

But I was just wondering, is there an easy way in UCS to search for all installed packages from a specific repo? eg: I would like to display a list of all installed packages from the cool-solutions repo only.

The software monitor doesn’t appear to do it (unless you know the package names you’re looking for). Perhaps that could be a feature request? Allow a way to filter by both origin and package state?

Googling around it seems that there is an aptitude command to search by repo origin but thats not installed by default in UCS:

aptitude search "?origin (ubuntu-wine) ?installed"

Also found a short shell script on the same answer that lists all packages in repo files in /var/lib/apt/lists but I still had to do some grepping to find cert packages as it seems ubuntu centric.

About the best method I’ve found was a short python script here: https://unix.stackexchange.com/a/185698

I still needed to grep for the origin repo, but seems to be the best option I’ve found so far.

# python list-packages.py |grep -i cool
univention-ldap-usercert        4.2.0-6A~4.4.0.201905311321     https://updates.software-univention.de/4.4/unmaintained/component       cool-solutions/all/
univention-usercert     4.2.0-6A~4.4.0.201905311321     https://updates.software-univention.de/4.4/unmaintained/component       cool-solutions/all/
univention-windowscert  4.2.0-6A~4.4.0.201905311321     https://updates.software-univention.de/4.4/unmaintained/component       cool-solutions/all/

Anyway, was curious if anyone had other ideas, so many ways to approach this I imagine.

Cheers.
Mark.

Mastodon