How to Use ‘Yum History’ to Find Out Installed or Removed Packages Info?

YUM is an interactive, rpm based, high-level package manager for RHEL/CentOS systems, it enables users to install new packages, remove/erase old/unwanted packages. It can automatically run system updates and does dependency analysis, and also perform queries on the installed packages and/or available packages plus so much more.

 

View Complete YUM History

 

To view a full history of YUM transactions, we can run the command below which will show us the: transaction id, login user who executed the particular action, date and time when the operation happened, the actual action and additional information about anything wrong with the operation:

# yum history

 

Use Yum to Find Package Info

 

The history sub-commands: info/list/summary can take a transaction ID or package name as an argument. Additionally, the list sub-command can take a special argument, all meaning – all transactions.

 

The previous history command is equivalent to running:

# yum history list all

 

And, you can view details of transactions concerning a given package such as httpd web server with the  info command as follows:

# yum history info httpd

 

To get a summary of the transactions concerning the httpd package, we can issue the following command:

# yum history summary httpd

 

It is also possible to use a transaction ID, the command below will display details of the transaction ID 15.

# yum history info 15

 

Use Yum History to Find Package Transaction Info

 

There are sub-commands that print out transaction details of a specific package or group of packages. We can use package-list or package_info to view more info about httpd package like so:

# yum history package-list httpd
OR
# yum history package-info httpd

 

To get history about multiple packages, we can run:

# yum history package-list httpd epel-release
OR
# yum history packages-list httpd epel-release

 

Find Yum History Database and Sources Info

 

These sub-commands provide us with information about the history DB and additional info sources:

  • addon-info – will provide sources of additional information.
  • stats – displays statistics about the current history DB.
  • sync – enables us to alter the rpmdb/yumdb data stored for any installed packages.

 

Consider the commands below to understand how these sub-commands practically work:

# yum history addon-info
# yum history stats
# yum history sync

 

To set a new history file, use the new sub-command:

# yum history new

 

We can find complete information about YUM history command and several other commands in the yum man page:

# man yum

 

Was this answer helpful? 0 Users Found This Useful (0 Votes)