table of contents
| dnf5-txnupd(8) | System Administration | dnf5-txnupd(8) |
NAME¶
dnf5-txnupd - transactional update plugin for DNF5
SYNOPSIS¶
dnf txnupd apply-live
dnf txnupd rollback [snapshot]
DESCRIPTION¶
dnf5-txnupd is a pair of DNF5 plugins that integrate the transactional-update(8) workflow directly into DNF5.
The libdnf5 plugin (libdnf5/plugins/txnupd.so) intercepts every DNF5 package transaction and executes it inside a new btrfs(5) snapshot created via tukit(8). If the transaction succeeds the snapshot is finalized and set as the new default boot target. If DNF5 exits without completing a transaction (for example during dnf makecache) the plugin's destructor discards the snapshot automatically so no stale snapshots accumulate.
The dnf5 command plugin (dnf5/plugins/txnupd.so) adds the txnupd subcommand group, which provides apply-live and rollback subcommands described below.
Both plugins require root privileges. Operations attempted as a non-root user, or when an installroot other than / is configured, are silently skipped so that sudo(8) and run0 continue to function normally. When the environment variable TRANSACTIONAL_UPDATE is set (indicating the process is already running inside a transactional-update shell), snapshot handling is also disabled to prevent nesting.
COMMANDS¶
dnf txnupd apply-live¶
Activate the current default snapshot on the running system immediately, without a reboot. This is equivalent to running transactional-update apply.
The command:
- Mounts the btrfs root device at a temporary directory.
- Bind-mounts the snapshot's /usr, /etc, and /boot trees over the corresponding live directories.
- Handles overlay /etc mounts as used by MicroOS.
- Reloads the systemd manager (systemctl daemon-reexec) and refreshes tmpfiles.
- Refreshes active systemd-sysext(8) extensions if any are loaded.
Running processes are not restarted; services that need the new software versions must be restarted separately.
dnf txnupd rollback [_snapshot_]¶
Roll back to a previous snapshot by invoking tukit rollback.
If snapshot is omitted, the currently running snapshot is used as the rollback target, effectively undoing any pending (not yet booted) update without requiring a snapshot number.
If snapshot is given, it must be the numeric snapshot ID as reported by snapper list. A new snapshot is created based on the specified one and set as the new default boot target.
When rolling back to the current running snapshot no reboot is required. For all other rollback targets the system must be rebooted to activate the change.
CONFIGURATION¶
Plugin configuration is read from /usr/share/dnf5/libdnf.plugins.conf.d/txnupd.conf. See dnf5-txnupd.conf(5) for a full description of all configuration keys.
FILES¶
/usr/lib64/libdnf5/plugins/txnupd.so
/usr/lib64/dnf5/plugins/txnupd.so
/usr/share/dnf5/libdnf.plugins.conf.d/txnupd.conf
EXIT STATUS¶
The plugin itself does not alter DNF5's exit status. dnf txnupd apply-live and dnf txnupd rollback exit with status 0 on success and non-zero on failure, following the standard DNF5 convention.
ENVIRONMENT¶
TRANSACTIONAL_UPDATE
SEE ALSO¶
dnf5(8), dnf5-txnupd.conf(5), transactional-update(8), tukit(8), snapper(8), btrfs(5)
AUTHORS¶
Shawn W Dunn <sfalken@kalpadesktop.org>
Neal Gompa <ngompa@velocitylimitless.com>
LICENSE¶
LGPL-2.1-or-later
| 2026-06-15 | libdnf-plugin-txnupd 0.2.0 |