第 8 章 Handling package management history
You can perform various operations with the package management history by using the dnf history command.
You can review the following information related to the DNF transactions:
- Timeline of transactions.
- Dates and times the transactions occurred.
- Number of packages affected by the transactions.
- Whether the transactions succeeded or were aborted.
- If the RPM database was changed between the transactions.
You can also use the dnf history command to undo operations performed during the transaction.
8.1. Listing DNF transactions 复制链接链接已复制到粘贴板!
By using the DNF software management tool, you can display information related to actions with packages.
You can use the dnf history command to perform the following tasks:
- List the latest transactions.
- List the latest operations for a selected package.
- Display details of a particular transaction.
Procedure
Depending on your scenario, use one of the following options to display transaction information:
To display a list of all the latest DNF transactions, enter:
# dnf historyThe output contains the following information:
-
The
Action(s)column displays which type of action was performed during a transaction, for example, Install (I), Upgrade (U), Remove (E), and other actions. The
Alteredcolumn displays the number of actions performed during the transaction. The number of actions can also be followed by the result of the transaction.For more information about the values of the
Action(s)andAlteredcolumns, see thednf(8)man page.
-
The
To display a list of all the latest operations for a selected package, enter:
# dnf history list <package_name>To display details of a particular transaction, enter:
# dnf history info <transaction_ID>