Sunday, April 28, 2024
19
rated 0 times [  19] [ 0]  / answers: 1 / hits: 20908  / 2 Years ago, sun, march 27, 2022, 4:22:40

I'm trying to find what packages I have installed from a repository using terminal commands.



I found a post somewhere saying I could use aptitude search "?origin (<repository>) ?installed", but I couldn't get it working. I tried searching for a packages that came from ppa:ubuntu-wine/ppa and got nothing with these:



aptitude search "?origin (http://ppa.launchpad.net/ubuntu-wine/ppa/ubuntu/) ?installed"
aptitude search "?origin (http://ppa.launchpad.net/ubuntu-wine/ppa/ubuntu/) ?installed"
aptitude search "?origin (http://ppa.launchpad.net/ubuntu-wine/ppa/ubuntu/ raring/main) ?installed"


It would be nice if I could get something that works with PPAs.


More From » command-line

 Answers
5

In brackets, you should use only the name of the repository, not the URI or something else. For example in your case:



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


Run apt-cache policy to see the repositories and the names (aka origin, o) of those:



$ apt-cache policy | grep wine
500 http://ppa.launchpad.net/ubuntu-wine/ppa/ubuntu xenial/main i386 Packages
release v=16.04,o=LP-PPA-ubuntu-wine,a=xenial,n=xenial,l=Wine Team PPA,c=main,b=i386
500 http://ppa.launchpad.net/ubuntu-wine/ppa/ubuntu xenial/main amd64 Packages
release v=16.04,o=LP-PPA-ubuntu-wine,a=xenial,n=xenial,l=Wine Team PPA,c=main,b=amd64


Since the search string is a regex pattern matched anywhere in the string, you can use a convenient substring like ubuntu-wine, or even just wine.



See also: How can I get a list of all repositories and PPAs from the command line into an install script?


[#29570] Sunday, March 27, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
rhaeams

Total Points: 115
Total Questions: 111
Total Answers: 103

Location: Burundi
Member since Wed, Nov 25, 2020
4 Years ago
;