I would like to list all the installed packages, with specific version numbers on my system. I checked out dpkg --get-selections
(How to list all installed packages) but it doesn't show me what I need. For example:
$ dpkg --get-selections apache2
apache2 install
shows that apache2 is installed, however not the version. I recently did a apt-get upgrade
so apache2.2.22-1 should be version installed (http://packages.ubuntu.com/precise-updates/apache2.2-common), but how can I show that?
Thanks!
Best Answer
Use
dpkg -l
instead.Example:
Outputs this:
If you only want to extract the name and version, you can do this:
Which will only print the second and third column from the above output, like this:
Of course, if you want to list all of your installed packages with their versions, and not only Skype, then just remove the
grep skype
part to make the command like this: