Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How linux uses Yum history to find information about installed or deleted software packages

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly shows you "linux how to use Yum history to find installed or deleted software package information", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "linux how to use Yum history to find installed or deleted software package information" this article.

Yum is an interactive rpm-based advanced package manager for RHEL/CentOS that users can use to install new packages, uninstall or remove old / unwanted packages. It can automatically run system updates, perform dependency analysis, query installed or available software packages, and so on.

View complete Yum history

To view the complete history of Yum transactions, we can run the following command, and then display: transaction ID, the user who performed the specific action, the date and time when the operation occurred, the actual action, and any additional information and actions for errors:

# yum history

View Yum history

Use Yum to find package information

A subcommand of history: info/list/summary can take a transaction ID or package name as an argument. In addition, the list subcommand can take special parameters, and all represents all transactions.

Run the following command to view the previous history:

# yum history list all

Also, you can use the following info command to view the details of transactions involving the specified package, such as httpd:

# yum history info httpd

Yum-find package information

You can get a summary of the transactions containing the httpd package by issuing the following command:

# yum history summary httpd

Yum-find a summary of the software package

You can also use the transaction's ID to find it, and the following command displays the details of the transaction with an ID of 15.

# yum history info 15

Yum-use ID to find package information

Use yum history to find package transaction information

There are some subcommands to print the transaction details of one or more software packages. We can use package-list or package_info to view more information about httpd, such as:

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

Yum-find package transaction information

To get records of multiple software packages, we can run:

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

Yum-find information about multiple software packages

Use Yum to roll back the package

In addition, there are some subcommands of history that allow us to undo / redo / roll back transactions.

Undo-cancels a specified transaction.

Redo-repeats the specified transaction once.

Rollback-undo all transactions after the specified transaction.

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

For example, suppose we have done 60 transactions, and last refers to transaction 60, which points to transaction 56.

Recommended reading: how to use yum-utils to maintain and accelerate Yum

The above subcommand works as follows: if we have five transactions-- VMagneWMagol XPY and Z, where each package is installed.

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

In the following example, transaction 2 is an update operation, as shown below, and the following redo command repeats transaction 2 until all packages are updated to the current time version:

# yum history | grep-w "2"

Yum-ID for finding software package transactions

# yum history redo 2

Update the software package with Yum

The redo subcommand can also add some optional parameters before we specify the transaction:

Force-reinstall-reinstall all packages installed in this transaction (via yum install, upgrade, or downgrade).

Force-remove-removes all packages that have been updated or rolled back.

# yum history redo force-reinstall 16

Yum-force installation of software packages

Find Yum historical database and source information

These subcommands provide us with information about historical databases and other sources of information:

Addon-info-provide more sources of information.

Stats-displays statistics for the current history database.

Sync-enables us to change the rpmdb/yumdb data stored for all installed packages.

See how the subcommands of the following command actually work:

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

Use the new subcommand to set up a new history file:

# yum history new

You can find complete information about the Yum history command and several other commands on the yum man page:

# man yum above is all the contents of the article "how to find installed or deleted software packages by linux using Yum history". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report