I'm in search for something analog to this question: Zypper: How do I display all packages from a certain repository?
Since I'm on Ubuntu, I need an aptitude based solution: How can I get a list of installed packages from a certain repository?
|
I'm in search for something analog to this question: Zypper: How do I display all packages from a certain repository? Since I'm on Ubuntu, I need an aptitude based solution: How can I get a list of installed packages from a certain repository? |
||||
|
|
|
Using aptitude, in order to look for installed packages outside of the stable branch, you can use:
To see versions as well as package-names (and instead of descriptions) you can use the command with the format option (
For more formats, please take a look at the manpage (here's documentation with avail. options). That works for example, in Debian if you installed packages outside Squeeze (by runing, for example, You can look where an installed package comes from via
For example, my python-numpy package renders the following output:
That means that I'm one version behind current sid/main's branch, so I have an old-sid version installed. I see I don't have the stable one because it is yet At time of submittal this package was already updated : ) |
|||||
|
|
After reading info page of aptitude and a dozen of attempts, I finally got this :
or (equivalent) :
It will search packages installed from unstable archives of any repository. You have to filter out packages from your default archive (testing in above example). If you want to filter packages installed from www.debian-multimedia.org/unstable :
Edit: “Archive”, “origin” etc. are deducted from the
|
||||
|
|
|
Examine the origin tag (such as o=Debian) for each of your current repositories:
Then search for packages from (or not from) a particular origin:
This is not suitable for a security audit because it relies on each repository to provide its own origin information, but it might be helpful for troubleshooting the origin of packages that are present in multiple repositories. |
|||||||||
|
|
For completeness: On Ubuntu systems you can use Synaptic for this task, too. In the left column you can filter packages by their origin. |
|||||||||
|
|
I've found this :
You can also find a list of search terms supported by "aptitude search" here. |
|||||||||||||
|
|
First, find the appropriate file(s) for the repository of interest in /var/lib/apt/lists. It should be possible to do this programmatically, but I haven't needed to do so. Using google chrome as an example, try this:
and I get the output:
dpkg -s returns 0 if the package is installed and nonzero otherwise. For future reference purposes, the output of
was
|
|||||||||||||||||||||
|