There are times when you need to go through the list of packages that were recently installed on Ubuntu for troubleshooting purposes, or maybe just to find a program you installed that is not showing up in the menu. There are two ways to find out what was installed recently. You can view recently installed packages by date using the Synaptic Package Manager and from the command line using a terminal window.
Use the Synaptic Package Manager
To view recently installed software packages using Synaptic Package Manager, select Administrative Tools | Synaptic package manager from the System menu.
In the Synaptic Package Manager dialog box, choose History from the File menu.
The “History” dialog box opens. All packages installed and removed using the Synaptic Package Manager are listed by month and date. Click the arrow to the left of the month in the left pane to display the dates in that month when the software packages were installed or removed. Click a date to view which packages were installed or removed that day in the right pane.
NOTE. The History dialog box displays only software packages installed using the Synaptic Package Manager. If you have installed other software by other means, such as through the Ubuntu Software Center, they are not listed here.
Click the Close button to close the History dialog box.
To close the Synaptic Package Manager, choose Exit from the File menu.
Use a terminal window
If you prefer to work in a terminal window, you can get a list of installed software packages using the command line. To do this, select Accessories | Terminal from the Applications menu.
Enter the following command at the command prompt and press Enter.
cat /var/log/dpkg.log | grep ” install ”
NOTE. There is a space after each backslash.
This command displays entries from the dpkg.log file that match the term “install”, including spaces before and after. Install entries indicate packages that have been fully installed.
All “install” entries in the dpkg.log file are displayed in the terminal window, with the most recent entries listed last.
If the dates in the dpkg.log file do not return to the value you want, there may be other dpkg log files. The dpkg.log file is updated and archived weekly. You can find the available dpkg log files by listing the contents of the / var / log directory.
To do this, enter the following command at the command prompt and press Enter.
$ ls â€“l / var / log
NOTE. The “ls” is followed by a dash and a lowercase “L” followed by another space.
Note that you get a list of all logs in / var / log, not just the logs for dpkg. To display only the log files for dpkg, type the following command at a command prompt and press Enter.
$ ls â€“l / var / log / dpkg *
NOTE. Again, the ls is followed by one dash and a lowercase L followed by another space.
Our system only shows one dpkg.log file because this is a new system that we installed recently. To open the dpkg.log file for viewing, type the following command at a command prompt and press Enter.
$ gedit /var/log/dpkg.log
The dpkg.log file will open in gedit. The list contains all packages, not just those with the “install” status. This makes it difficult to find fully installed packages.
TIP: Using cat /var/log/dpkg.log | The grep ” install ” command is probably the best way to view the list of installed packages, as only the “install” entries are displayed in the log file. If you need to view installed packages older than those available in the dpkg.log file, simply replace the dpkg.log file name in the cat command with the other dpkg log file names that you find with the ls â€“l / var / log / dpkg * command.
To close gedit, choose Exit from the File menu.
You may notice that the list created using the Terminal window is more complete. The list contains programs installed by any means, not just programs installed using the Synaptic Package Manager.
Posted by Laurie Kaufman