How to tell which repositories provide which packages?

Jim Byrnes jf_byrnes at comcast.net
Tue Jan 5 22:02:32 UTC 2021


On 1/5/21 3:41 PM, Chris Green wrote:
> On Tue, Jan 05, 2021 at 03:29:17PM -0500, Little Girl wrote:
>> Hey there,
>>
>> Chris Green wrote:
>>
>>> Is there a way to tell from which repositories packages have been
>>> installed?
>>>
>>> I particularly want to see if I have any packages installed from a
>>> particular PPA.
>>
>> This will give you your installed version, the candidate version
>> that's available (if any), and the sources for the various versions:
>>
>> apt-cache policy PACKAGENAME
>>
> This doesn't really tell me the truth:-
> 
>      chris at esprimo$ apt-cache policy '*' | grep syncthing
>      syncthing:
>      syncthing-relaysrv:
>      golang-github-syncthing-syncthing-dev:
>      golang-github-syncthing-notify-dev:
>      syncthing-discosrv:
>      chris at esprimo$ dpkg -l | grep syncthing
>      ii  syncthing                             1.12.0
>            amd64        Open Source Continuous File Synchronization
>      chris at esprimo$
> 
> So apt-cache policy '*' returns things which either aren't package
> names or aren't installed.
> 
> 
>> If you're feeling frisky, either of these will probably give you way
>> more information that you need, but can be good to keep in your back
>> pocket:
>>
>> dpkg -s PACKAGENAME
>>
>> apt-cache showpkg PACKAGENAME
>>
> Neither of these seems to show anything about the PPA.
> 

I think the Synaptic  Package Manager will do so. Just click on the 
Origin button. I don't have anything installed from a PPA on this 
machine, but I am sure it showed them in the past.

Regards,  Jim





More information about the ubuntu-users mailing list