Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

With rpm it is possible to list installed packages with additional info

rpm -qa --queryformat "%-35{NAME} %-35{DISTRIBUTION} %{VERSION}-%{RELEASE}\n" | sort -k 1,2 -t " " -i

which will produce something like

xorg-x11-drv-ur98                   (none)                              1.1.0-1.1
xorg-x11-drv-vesa                   CentOS-5                            1.3.0-8.3.el5
xorg-x11-drv-vga                    (none)                              4.1.0-2.1
xorg-x11-drv-via                    (none)                              0.2.1-9

On Ubnutu server would I like to list all installed packages and show from which repository in came from.

Can that be done?

share|improve this question

closed as off-topic by Magellan, Jenny D, mdpc, Nathan C, Dave M Oct 10 '13 at 17:57

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions must be relevant to professional system administration. Server Fault is a site dedicated to professionals; novice questions are off-topic. Please see the Help Center for more information on topicality. The best advice we can give you is to hire a professional to help you out." – Magellan, Jenny D, mdpc, Nathan C, Dave M
If this question can be reworded to fit the rules in the help center, please edit the question.

up vote 4 down vote accepted

Take a look at "man dpkg-query". The following should get you started:

    skx@precious:~$ dpkg-query --showformat="\${Package}\t\${Version}\t\${Origin}\n" --show \*
share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.