How to tell which repositories provide which packages?

Ralf Mardorf kde.lists at yahoo.com
Wed Jan 6 16:04:46 UTC 2021


On Wed, 6 Jan 2021 10:42:14 -0500, Little Girl wrote:
>Hey there,
>
>Ralf Mardorf via ubuntu-users wrote:
>>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.  
>
>You're absolutely right.

I didn't verify if it really does show all packages ;). But much likely
it does. If it shouldn't, then the solution I like the best would be
faulty, too.

>I've only got two small PPAs on this system and didn't notice it.
>Thanks for catching that and also for all the additional research you
>did.
>
>I took a look at all the commands you sent and, after messing around
>with those and some of mine, I put together this collection of
>commands for getting information about PPAs. You'll see your commands
>in there and I marked the one you provided that's most likely to give
>the OP what he's after with an arrow:
>
>https://paste.ubuntu.com/p/2X2NWZkv4m/

It's a good collection for somebody who want's to use it as a starting
point to write a good script. You might want to point out the pitfall of
"grep ii" for a "dpkg -l". Btw. I don't know if dpkg has kind of a
quite option, that might make redirecting stderr unnecessary.




More information about the ubuntu-users mailing list