dnf5-history - Man Page

History Command

Synopsis

dnf5 history <subcommand> [options] [<transaction-spec>]

Description

The history command in DNF5 allows the user to view what has happened in past transactions and offers several operations on these transactions, like undoing and redoing them. In order to use the transactions in these commands, it is assumed that they were committed while using the history_record configuration option.

For more information about <transaction-spec> see dnf5-specs(7), Patterns specification.

Subcommands

list
List info about recorded transactions in the system.
If no <transaction-spec> is specified it uses all transactions.
info
Print details about specific transactions.
If no <transaction-spec> is specified it uses the last transaction.
undo
Revert all actions from the specified transaction.
Exactly one transaction must be specified by <transaction-spec>.
redo
Repeat the specified transaction.
Automatically uses --ignore-extras and --ignore-installed.
Unlike the rest of history commands it overrides reasons for transaction packages that are already installed.
This command is useful to finish interrupted transactons.
Exactly one transaction must be specified by <transaction-spec>.
rollback
Undo all transactions performed after the specified transaction.
Exactly one transaction must be specified by <transaction-spec>.
store
Store the transaction into a directory.
If no <transaction-spec> is specified it uses the last transaction.

Options for List and Info

--reverse
Reverse the order of transactions in the output.
--contains-pkgs=PACKAGE_NAME,...
Show only transactions containing packages with specified names.
This is a list option. Globs are supported.
--json
Request JSON output format for machine-readable results.
Available for list and info subcommands only.

Options for Undo, Rollback and Redo

--skip-unavailable
Allow skipping packages actions that are not possible perform.
--offline
Store the transaction to be performed offline. See offline command, dnf5-offline(8).
--store=PATH
Store the current transaction in a directory at the specified PATH instead of running it.
The stored transaction can be performed by the replay command, dnf5-replay(8).
Note that repository ids in the stored transaction are mangled to @stored_transaction(repo_id) this is required
because during replaying the stored repositories are recreated and they might collide with already present repositories
(this doesn't apply to the special @System repository).

Options for Undo and Rollback

--ignore-extras
Don't consider extra packages pulled into the transaction as errors.
They will still be reported as warnings.
--ignore-installed
Don't consider mismatches between installed and stored transaction packages as errors.
They will still be reported as warnings.
Using this option can result in an empty transaction.
For install actions skip already installed packages.
For upgrade actions skip groups or environments that are not installed.
For remove actions skip not installed packages/groups/environments.

Examples

dnf5 history list
List all transactions, where the most recent transaction is printed first.
dnf5 history info 4
Show detailed info about the fourth transaction.
dnf5 history info last
Show detailed info about the last transaction.
dnf5 history info last-1
Show detailed info about the second to last transaction.
dnf5 history list 4..8
List transactions with id in 4 to 8 range.
dnf5 history undo last
Undo the last transaction.
dnf5 history undo 4 --ignore-extras
Undo the fourth transaction ignoring extra packages pulled into the reverting transaction.
dnf5 history list --json
List all transactions in JSON format for programmatic processing.
dnf5 history info last --json
Show detailed info about the last transaction in JSON format with complete package details.

JSON Output

The command returns a JSON array, each element describing one transaction. Each transaction object contains the following fields:

The command returns a JSON array, each element describing one transaction. Each transaction object contains the following fields:

For empty results, both commands return [].

See Also

dnf5-specs(7), Patterns specification

Author

See AUTHORS.md in dnf5 source distribution.

Referenced By

dnf5(8).

The man page dnf-history(8) is an alias of dnf5-history(8).

Nov 05, 2025 dnf5