How to tell which repositories provide which packages?
Ralf Mardorf
kde.lists at yahoo.com
Wed Jan 6 04:35:45 UTC 2021
I guess this does the job:
apt-cache policy $(awk '$1 == "Package:" { print $2 }' /var/lib/apt/lists/*webupd8*amd64_Packages) | grep -E Installed:\ [[:digit:]] -B1
Replace "*webupd8*amd64" by the wanted PPA.
My last mail didn't come through the list:
Begin forwarded message:
Date: Wed, 6 Jan 2021 05:12:50 +0100
From: Ralf Mardorf
To: ubuntu-users at lists.ubuntu.com
Subject: Re: How to tell which repositories provide which packages?
On Tue, 5 Jan 2021 18:17:10 -0500, Little Girl wrote:
>Then I can follow that by inserting the repository name I got from
>that command into this command to get all the packages installed by
>that PPA:
>
>awk '$1 == "Package:" { print
>$2 }' /var/lib/apt/lists/repo.REPOSITORYNAME*Packages
You are mistaken, it does show all packages provided by the PPA, but
they aren't necessarily installed. It "seems" to work for a PPA that
just does provide one or a few packages, but not for PPAs with tons of
packages that aren't installed.
[weremouse at moonstudio ~]$ awk '$1 == "Package:" { print $2 }' /var/lib/apt/lists/*obs-studio*amd64_Packages
obs-studio
[weremouse at moonstudio ~]$ awk '$1 == "Package:" { print $2 }' /var/lib/apt/lists/*webupd8*amd64_Packages | head -1
albert
[weremouse at moonstudio ~]$ apt-cache policy obs-studio | grep In
Installed: 25.0.8-0obsproject1~xenial
[weremouse at moonstudio ~]$ apt-cache policy albert | grep In
Installed: (none)
More information about the ubuntu-users
mailing list