Possible Duplicate:
How to list all installed packages?
How do I list installed software with the installed size?

is there a way to know what are the packages installed on my machine, detailed information, like each software and its version? Like to know if I have qt installed and what version, or gcc and what version. Thanks


2 Answers 2


In a terminal, you can do a

dpkg --list

to get an overview of all installed packages including their version numbers. Since this generates usually a long output, you might consider to do

dpkg --list | less


dpkg --list | grep qt
  • What does it mean to have ri or ii at the beginning of each line? Sep 25, 2012 at 19:21
  • 2
    These are status flags. The first letter is the desired installation status, the second says something about the de-facto installation status. "ri" means it is currently installed, but is about to be removed, "ii" means it was successfully installed. "ri" is kinda strange though - was there a problem with your last attempt to remove a package? If I remove a package, it usually shows as "rc": removed, configuration files left on the system. Sep 25, 2012 at 19:31
  • no, actaully i tried to remove the gcc-4.6 becuae i installed gcc-4.7, i think thats why i'm having ri, but it didnt get removed becuase other softwares like gnat-4.6 depends on it, so is it okay if i leave it like this or should i fix it? Sep 25, 2012 at 19:36
  • You can leave it like that. It won't do any harm other than having multiple versions of gcc around. Sep 25, 2012 at 21:10

To List all packages installed

dpkg --get-selections 

To get details about particular package version use

  • dpkg -l <package_name>


  • apt-cache policy <package_name>


$ dpkg -l perl
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version      Architecture Description
ii  perl           5.14.2-13    i386         Larry Wall's Practical Extraction

$ apt-cache policy perl
  Installed: 5.14.2-13
  Candidate: 5.14.2-13
  Version table:
 *** 5.14.2-13 0
        500 http://in.archive.ubuntu.com/ubuntu/ quantal/main i386 Packages
        100 /var/lib/dpkg/status

To show the version along with the installed package. use


If apt-show-versions is not installed use sudo apt-get install apt-show-versions


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