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.
Best Answer
In brackets, you should use only the name of the repository, not the URI or something else. For example in your case:
Run
apt-cache policy
to see the repositories and the names (aka origin,o
) of those:Since the search string is a regex pattern matched anywhere in the string, you can use a convenient substring like
ubuntu-wine
, or even justwine
.See also: How can I get a list of all repositories and PPAs from the command line into an install script?