Jul 202015

Commands to List Software Installed by Date on Linux SystemsIt’s easy to get a list of all the software installed or upgraded on a Linux system.

If you’re running CentOS, RedHat or Fedora, just run the below command on the terminal to get the complete list of all software installed on your PC or server.

$ rpm -qa

If you’re running Debian, Ubuntu or Linux Mint, go with either of the below commands.

$ dpkg --get-selections

The following command will work fine too.

$ dpkg -l

Software Installed by Date

RPM Based Linux Systems

However, there are occasions when we’d like to know about the software on our Linux system by date of installation.

It’s easy to find software installed by date on rpm based package management systems like CentOS, RedHat and Fedora but hard on dpkg systems (Debian, Ubuntu, Linux Mint, Lubuntu, and Xubuntu).

Let’s first take a deko at how to do it on rpm based Linux systems.

Here’s an example of a command to find software installed by date on a CentOS 7 system.

[thomas@localhost ~]$ rpm -qa --last
java-1.7.0-openjdk-headless- Sun 19 Jul 2015 12:06:56 PM EDT
lksctp-tools-1.0.13-3.el7.x86_64              Sun 19 Jul 2015 12:06:52 PM EDT
java-1.7.0-openjdk- Sun 19 Jul 2015 12:06:52 PM EDT
inxi-2.2.25-1.el7.noarch                      Tue 14 Jul 2015 07:48:52 PM EDT
simple-scan-3.12.2-1.el7.x86_64               Sun 12 Jul 2015 05:42:20 PM EDT
lz4-r130-1.el7.x86_64                         Sun 12 Jul 2015 05:42:20 PM EDT
k3b-common-2.0.2-17.el7.noarch                Fri 10 Jul 2015 02:15:49 PM EDT
libkcddb-4.10.5-3.el7.x86_64                  Fri 10 Jul 2015 02:15:48 PM EDT
k3b-libs-2.0.2-17.el7.x86_64                  Fri 10 Jul 2015 02:15:48 PM EDT
k3b-2.0.2-17.el7.x86_64                       Fri 10 Jul 2015 02:15:48 PM EDT
kde-runtime-libs-4.10.5-8.el7.x86_64          Fri 10 Jul 2015 02:15:47 PM EDT
kde-runtime-4.10.5-8.el7.x86_64               Fri 10 Jul 2015 02:15:47 PM EDT
kde-runtime-drkonqi-4.10.5-8.el7.x86_64       Fri 10 Jul 2015 02:15:45 PM EDT
-  - - - - - - - - - -
[thomas@localhost ~]$

Easy as pie, isn’t it?

We can also find out installation details for a specific package with the below command:

$ rpm -q --last package-name

Here’s an example:

[thomas@localhost ~]$ rpm -q --last firefox
firefox-38.1.0-1.el7.centos.x86_64      Tue 07 Jul 2015 11:48:49 AM EDT
DPKG Based Linux Systems

It’s harder to get the list of software installed by date on Debian, Ubuntu, Linux Mint and other dpkg based Linux distributions.

Although there are some workarounds like examining the dpkg.log file, they’re not foolproof because the log files are rotated after some time.

$ grep install /var/log/dpkg.log

If the log file has been rotated, you should try the below command.

$ grep install /var/log/dpkg.log /var/log/dpkg.log.1

But since /var/log/dpkg.log.* files are eventually deleted by log rotation over time, you have no reliable method of getting the full history of software installations by date on your Debian or Ubuntu Linux PC or server.

Sorry, the comment form is closed at this time.