DNF5-HISTORY(8)

πŸ’– DNF5-HISTORY(8) πŸ’–

okay bestie, welcome to dnf5-history, aka the History Command of the dnf5 manual. this is the little time machine for your package transactions and i'm literally obsessed with it πŸ•°οΈβœ¨


✨ NAME ✨

dnf5-history β€” the History Command, no cap.


🌸 SYNOPSIS 🌸

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

πŸ¦‹ DESCRIPTION πŸ¦‹

so like, the history command in DNF5 lets you peek at what went down in all your past transactions, and it also serves up several operations you can do on them β€” undoing, redoing, the whole glow-up routine πŸ’….

⚠️ real talk: for these commands to work with your transactions, it's assumed that those transactions were committed while using the history_record configuration option. if they weren't... girl, they're not in the record, periodt.

for more tea about <transaction-spec>, go check dnf5-specs(7), Patterns specification <#transaction-spec-label>. 🫢


πŸ‘‘ SUBCOMMANDS πŸ‘‘

  • list β€” List info about recorded transactions in the system. if you don't hand it a <transaction-spec>, it just uses all transactions. the whole archive, bestie.
  • info β€” Print details about specific transactions. if no <transaction-spec> is specified, it uses the last transaction. (the most recent main character πŸŽ€)
  • undo β€” Revert all actions from the specified transaction. Exactly one transaction must be specified by <transaction-spec>. one. not two. don't be greedy πŸ™ˆ
  • redo β€” Repeat the specified transaction. it automatically uses --ignore-extras and --ignore-installed. and unlike the rest of the history commands, it overrides reasons for transaction packages that are already installed. super useful for finishing interrupted transactions (we've all been there 😭). Exactly one transaction must be specified by <transaction-spec>.
  • rollback β€” Undo all transactions performed after the specified transaction. yep, everything after. 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. flip it and reverse it πŸ”„
  • --contains-pkgs=PACKAGE_NAME,... β€” Show only transactions containing packages with specified names. this is a list option, and globs are supported ✨
  • --json β€” Request JSON output format for machine-readable results. Available for list and info subcommands only. (sorry other subcommands, this one's not for you πŸ’€)

πŸ”₯ 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 <#offline-command-ref-label>, dnf5-offline(8).
  • --transient β€” Applicable only on bootc (bootable containers) systems. Perform transactions using a transient overlay which will be lost on the next reboot. See also the persistence <#persistence-options-label> configuration option. (gone by next reboot, it's giving vanishing act πŸ«₯)
  • --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 <#replay-command-ref-label>, 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. (not mad, just disappointed πŸ₯²)
  • --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 πŸŽ€

  • dnf5 history list --json

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

  • id (integer) - Transaction ID.
  • command_line (string) - Command line that initiated the transaction.
  • start_time (integer) - Transaction start time, UNIX time.
  • end_time (integer) - Transaction end time, UNIX time.
  • user_id (integer) - User ID who initiated the transaction.
  • status (string) - Transaction status, typically "Ok".
  • releasever (string) - System release version when transaction occurred.
  • altered_count (integer) - Number of packages altered in the transaction.
  • dnf5 history info --json

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

  • id (integer) - Transaction ID.
  • start_time (integer) - Transaction start time, UNIX time.
  • end_time (integer) - Transaction end time, UNIX time.
  • rpmdb_version_begin (string) - RPM database version before the transaction.
  • rpmdb_version_end (string) - RPM database version after the transaction.
  • user_id (integer) - User ID who initiated the transaction.
  • user_name (string) - User name and details who initiated the transaction.
  • status (string) - Transaction status, typically "Ok".
  • releasever (string) - System release version when transaction occurred.
  • description (string) - Command line that initiated the transaction.
  • comment (string) - User comment for the transaction (usually empty).
  • packages (array) - List of packages altered in the transaction. Each package object contains:
    • nevra (string) - Package name-epoch:version-release.architecture.
    • action (string) - Action performed (Install, Remove, Upgrade, etc.).
    • reason (string) - Reason for the action (User, Dependency, etc.).
    • repository (string) - Repository from which the package came.
  • groups (array) - List of package groups altered (only present if groups were modified).
  • environments (array) - List of package environments altered (only present if environments were modified).

For empty results, both commands return []. (empty array, empty vibe, but still valid πŸ™ˆ)


🧚 SEE ALSO 🧚

dnf5-specs(7), Patterns specification <#specs-misc-ref-label>


πŸ’Œ Author

See AUTHORS.md in dnf5 source distribution.

Contributors to the dnf5 project.


and that's the whole page, bestie!! this one's from the dnf5 manual, dated Sep 24, 2026, filed under DNF5-HISTORY(8) β€” go forth and undo your mistakes (package-wise, at least) πŸ’–βœ¨πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from