Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

Is there a way to compare which programs are currently installed on my linux box compared to the stock versions? I need to recreate my current setup for another computer, and have installed many little command line programs that I can't remember everything that all of my own python scripts depend on - for example xdotool and xprintidle. If I try my python scripts on a computer without them, they just fail since the programs don't exist. Is there a way to get a list of all of these programs other than simply running each of my python programs until they fail?

share|improve this question
In order to have a chance of answering this, you'll need to specify which distribution of Linux you are using. – ChrisInEdmonton Oct 17 '13 at 19:27
I'm using ubuntu linux – user114558 Oct 17 '13 at 19:57
In that case, see… – ChrisInEdmonton Oct 17 '13 at 20:09

The best command is

sudo dpkg -l

It produces a lot of output, so careful. It shows the package version and the architecture, neither of which are shown by dpkg --get-selections. Also, it allows searches:

sudo dpkg -l *xserver*

all packages related to X server. But above all, it provides a brief description of each installed package,

# dpkg -l 
||/ Name                                  Version                                Architecture Description
ii  accountsservice                       0.6.29-1ubuntu8                        amd64        query and manipulate user account information
ii  acl                                   2.2.51-8ubuntu3                        amd64        Access control list utilities
ii  acpi                                  1.6-1                                  amd64        displays information on ACPI devices
ii  acpi-support                          0.141                                  amd64        scripts for handling many ACPI events

which dpkg --get-selections does not provide:

# dpkg --get-selections
accountsservice                                 install
acl                                             install
acpi                                            install
acpi-support                                    install
acpid                                           install
adduser                                         install
share|improve this answer
Correct me, but I think you don't need sudo for dpkg -l. (It's /usr/bin/dpkg not /usr/sbin/dpkg) – mpy Oct 19 '13 at 16:23
You are right, no sudo. – MariusMatutiae Oct 19 '13 at 17:13

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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