• Contact
  • Contact Us
  • Disclamer
  • Home 1
  • Home 2
  • Home 3
  • Privacy Policy
Thursday, May 8, 2025
How VPS - How to use/setup VPS
  • Login
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon
No Result
View All Result
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon
No Result
View All Result
How VPS - How to use/setup VPS
No Result
View All Result
Home Operating System Linux

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

How VPS by How VPS
November 2, 2018
in Linux, Operating System
0
0
SHARES
126
VIEWS
Share on FacebookShare on Twitter

Contents

  1. View Complete YUM History
  2. Use Yum to Find Package Info
  3. Use Yum History to Find Package Transaction Info
  4. Use Yum to Rollback Packages
  5. Find Yum History Database and Sources 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.

In this article, we will explain how to view history of YUM transactions in order to find out information about installed packages and those that where removed/erased from a system.

Suggested Read: 20 Linux YUM Commands for Package Management

Below are some examples of how to use the YUM history command.

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 any thing wrong with the operation:

# yum history 
How to Use ‘Yum History’ to Find Out Installed or Removed Packages Info

View 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
How to Use ‘Yum History’ to Find Out Installed or Removed Packages Info

Yum – Find Package Info

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

# yum history summary httpd
How to Use ‘Yum History’ to Find Out Installed or Removed Packages Info

Yum – Find Summary of Package

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

# yum history info 15
How to Use ‘Yum History’ to Find Out Installed or Removed Packages Info

Yum – Find Package Info Using ID

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
How to Use ‘Yum History’ to Find Out Installed or Removed Packages Info

Yum – Find Package Transaction Info

To get history about multiple packages, we can run:

# yum history package-list httpd epel-release
OR
# yum history packages-list httpd epel-release
How to Use ‘Yum History’ to Find Out Installed or Removed Packages Info

Yum – Find Multiple Packages Info

Use Yum to Rollback Packages

Furthermore, there are certain history sub-commands that enable us to: undo/redo/rollback transactions.

  1. Undo – will undo a specified transaction.
  2. redo – repeat the work of a specified transaction
  3. rollback – will undo all transactions up to the point of the specified transaction.

They take either a single transaction id or the keyword last and an offset from the last transaction.

For example, assuming we’ve done 60 transactions, “last” refers to transaction 60, and “last-4” points to transaction 56.

Suggested Read: How to Use ‘yum-utils’ to Maintain Yum and Boost its Performance

This is how the sub-commands above work: If we have 5 transactions: V, W, X, Y and Z, where packages where installed respectively.

# yum history undo 2    #will remove package W
# yum history redo 2    #will  reinstall package W
# yum history rollback 2    #will remove packages from X, Y, and Z. 

In the following example, transaction 2 was a update operation, as seen below, the redo command that follows will repeat transaction 2 upgrading all the packages updated by that time:

# yum history | grep -w "2"
How to Use ‘Yum History’ to Find Out Installed or Removed Packages Info

Yum – Find Package Transaction ID

# yum history redo 2
How to Use ‘Yum History’ to Find Out Installed or Removed Packages Info

Yum Redo Package Update

The redo sub-command can also take some optional arguments before we specify a transaction:

  1. force-reinstall – reinstalls any packages that were installed in that transaction (via yum install, upgrade or downgrade).
  2. force-remove – removes any packages that were updated or downgraded.
# yum history redo force-reinstall 16
How to Use ‘Yum History’ to Find Out Installed or Removed Packages Info

Yum – Force Install Package

Find Yum History Database and Sources Info

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

  1. addon-info – will provide sources of additional information.
  2. stats – displays statistics about the current history DB.
  3. sync – enables us to alter the 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 a complete information about YUM history command and several other commands in the yum man page:

# man yum

Suggested Read: 4 Ways to Disable/Lock Certain Package Updates Using Yum

That’s it for now. In this guide, we explained various YUM history commands to view details of YUM transactions. Remember to offer us your thoughts concerning this guide via the comment section below.

Source: tecmint.com

Tags: Linux Commandslinux guidelinux vps setup guide
Previous Post

How to Test Website Loading Speed in Linux Terminal

Next Post

How to Save Command Output to a File in Linux

Next Post

How to Save Command Output to a File in Linux

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

No Result
View All Result

Recent Post

Install Imagemagick on CentOS
CentOS

Install Imagemagick on CentOS

by How VPS
June 28, 2023
0

This is how I installed Imagemagick on a vanilla CentOS server Start off by installing the prerequisites yum install php-pear...

Read more
how to Check phpinfo

How to Check phpinfo of Hosting or VPS?

June 28, 2023
Failed to download metadata for repo 'appstream' on Centos 8

How to fix error: Failed to download metadata for repo ‘appstream’ on Centos 8

February 25, 2022
How to Fix MySQL Error "Plugin 'InnoDB' registration as a STORAGE ENGINE failed"?

How to Fix MySQL Error “Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed”?

November 17, 2020
How to optimize Mysql or MariaDB

How to optimize Mysql or MariaDB

November 3, 2020

Recent News

  • Install Imagemagick on CentOS
  • How to Check phpinfo of Hosting or VPS?
  • How to fix error: Failed to download metadata for repo ‘appstream’ on Centos 8

Category

  • Arch
  • Authentication
  • Backups
  • BSD
  • Centmin Mod
  • CentOS
  • Control Panels
  • CoreOS
  • CWP
  • Debian
  • Directadmin
  • Encryption
  • Fedora
  • Firewalls
  • Hocvps Script
  • Hosting providers
  • Kloxo-MR
  • Linux
  • Mitigations
  • Operating System
  • Plesk
  • Reviews
  • Securing VPS/Servers
  • Security Patches
  • SSL Certificates
  • Uncategorized
  • Upgrading
  • VPS/Servers management guides
  • Vulnerability Detection
  • Web servers software
  • Webhosting Control Panel
  • About
  • Advertise
  • Careers
  • Contact

© 2025 JNews - Premium WordPress news & magazine theme by Jegtheme.

No Result
View All Result
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon

© 2025 JNews - Premium WordPress news & magazine theme by Jegtheme.

Welcome Back!

Login to your account below

Forgotten Password?

Retrieve your password

Please enter your username or email address to reset your password.

Log In
Thabet