Ubuntu – In Ubuntu Linux, how to list packages installed from the “universe” repository

aptdebiandpkgUbuntu

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.

Best Answer

Okay, I figured out how to do this:

aptitude search "~i" -F "%s# %p"

Which of course can easily be grepped to find items from the “universe” repository:

aptitude search "~i" -F "%s# %p" | grep universe