Ubuntu – How to list installed package and its details on ubuntu

aptdpkg

I am new to ubuntu and trying to find out the way to list all installed packages and its details like version, release, install time, category on Ubuntu. Found that following commands will help me get some of this information:

1) dpkg -l

2) dpkg-query -W -f='${PackageSpec}\t${version}\t${Description}\n'

Unlike Redhat the install time and category information is missing in this. Can anyone know of a way to retrieve these details?

Thanks in advance.

Best Answer

Simple and elegant:

sudo dpkg -l | more

or

sudo dpkg -l | less

If you want to get the description of some specific packages say firefox:

sudo dpkg -l | grep firefox

Here is my output of:

$ sudo dpkg -l | more
 Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                                        Version                                 Description
+++-===========================================-=======================================-==============================================================
================
ii  accountsservice                             0.6.15-2ubuntu9.4                       query and manipulate user account information
ii  acl                                         2.2.51-5ubuntu1                         Access control list utilities
ii  acpi-support                                0.140                                   scripts for handling many ACPI events
ii  acpid                                       1:2.0.10-1ubuntu3                       Advanced Configuration and Power Interface event daemon
ii  activity-log-manager-common                 0.9.4-0ubuntu3.2                        blacklist configuration for Zeitgeist (assets)
ii  activity-log-manager-control-center         0.9.4-0ubuntu3.2                        blacklist configuration for Zeitgeist (control center integrat
ion)
ii  adduser                                     3.113ubuntu2                            add and remove users and groups
ii  adium-theme-ubuntu                          0.3.2-0ubuntu1                          Adium message style for Ubuntu
ii  aisleriot                                   1:3.2.3.2-0ubuntu1                      Solitaire card games
ii  akonadi-backend-mysql                       1.7.2-0ubuntu1                          MySQL storage backend for Akonadi
ii  akonadi-server                              1.7.2-0ubuntu1                          Akonadi PIM storage service
ii  alacarte                                    0.13.2-2ubuntu4                         easy GNOME menu editing tool
ii  alsa-base                                   1.0.25+dfsg-0ubuntu1                    ALSA driver configuration files
ii  alsa-utils                                  1.0.25-1ubuntu5                         Utilities for configuring and using ALSA
ii  anacron                                     2.3-14ubuntu1                           cron-like program that doesn't go by time
ii  apg                                         2.2.3.dfsg.1-2                          Automated Password Generator - Standalone version
ii  app-install-data                            0.12.04.4                               Ubuntu applications (data files)
ii  app-install-data-partner                    12.12.04.1                              Application Installer (data files for partner applications/rep
ositories)
ii  apparmor                                    2.7.102-0ubuntu3.7                      User-space parser utility for AppArmor
ii  appmenu-gtk                                 0.3.92-0ubuntu1.1                       Export GTK menus over DBus
ii  appmenu-gtk3                                0.3.92-0ubuntu1.1                       Export GTK menus over DBus
ii  appmenu-qt                                  0.2.6-0ubuntu1                          appmenu support for Qt
ii  apport                                      2.0.1-0ubuntu17.1                       automatically generate crash reports for debugging
ii  apport-gtk                                  2.0.1-0ubuntu17.1                       GTK+ frontend for the apport crash report system
ii  apport-symptoms                             0.16.1                                  symptom scripts for apport
ii  apt                                         0.8.16~exp12ubuntu10.7                  commandline package manager
ii  apt-transport-https                         0.8.16~exp12ubuntu10.7                  https download transport for APT
ii  apt-utils                                   0.8.16~exp12ubuntu10.7                  package managment related utility programs
--More--

To get the date and time of packages being installed

cat /var/log/dpkg.log | grep " install "

To get for specific package:

$cat /var/log/dpkg.log | grep " install " | grep banshee
2013-12-12 12:51:48 install banshee <none> 2.4.1-3ubuntu1~precise2
2013-12-12 12:51:51 install banshee-extensions-common <none> 2.4.0-1ubuntu1
2013-12-12 12:51:51 install banshee-extension-radiostationfetcher <none> 2.4.0-    1ubuntu1
2013-12-12 12:51:51 install banshee-extension-soundmenu <none> 2.4.1-3ubuntu1~precise2

To get the section

$apt-cache show firefox | grep Section
Section: web

See Also: ListInstalledPackagesByDate

Related Question