On an Ubuntu 10.04 LTS server, I want to list installed packages and see what repository they come from.
It’s easy to list installed packages, but it does not include the name of the repository (such as “main” or “universe”). And this information isn’t in /var/lib/dpkg/status
, so dpkg-query
doesn’t show it either.
I want to get a list of “unsupported” software—that is, software that doesn’t come from the “main” repository, and for which Ubuntu does not guarantee security updates.
Note: This is a server. It does not have X, GNOME or KDE installed.
Okay, I figured out how to do this:
Which of course can easily be grepped to find items from the “universe” repository:
You can provide a custom format for the output of the dpkg command (using the -f option). Try something like this, using the Origin variable:
There's more info on the formatting argument on this page: http://www.tin.org/bin/man.cgi?section=1&topic=dpkg-query
I tried aptitude search ~i -F "%s# %p"
in ubuntu 12.04 and 14.04 but it didn't show repositories.
So I wrote this small script:
Then
This is not exactly an answer but might be used to help. A colleague showed me this the other day. You can find out where a package is from using this command:
apt-cache policy <package-name>
For example: