Roll back a problematic update using downgrade and transaction history workflows across RPM, yum-style history undo, APT version installs, and pacman cache installs. The goal is to restore a known-good package state while preserving a clear audit trail of what changed.
A recent patch introduced regressions and your priority is to return systems to a stable baseline. You will practice rollback workflows on multiple distro families so you can respond quickly when a package update breaks production behavior.
Rollback is a stabilization move. In the field, pair it with incident notes: what changed, what version you reverted to, and how you validated recovery (service health, logs, and user impact).
rpm --oldpackage.
yum history.
.pkg.tar.zst file with pacman.
Downgrades can break dependencies. In production, verify the service impact and coordinate change windows when the package is critical.
rpm -Uvh --oldpackage bash-5.1.rpm
--oldpackage
allows installing an older version over a newer one. This is
the most direct rollback path when you already have the known-good
RPM artifact available.
Preparing... ################################# [100%]
Updating / installing...
1: bash-5.1 ################################# [100%]
yum history undo last
yum history
tracks transactions. Undoing the last transaction is a fast
way to revert a regression that appeared immediately after an update.
Loaded plugins: fastestmirror
Undoing transaction 33...
Reverting installed/erased/updated packages...
sudo apt install bash=5.1-2ubuntu3
Installing pkg=version forces APT to select that
exact version if it is available in your configured sources.
This is explicit, repeatable, and easy to document.
Reading package lists... Done
The following packages will be downgraded:
bash
sudo pacman -U /var/cache/pacman/pkg/bash-5.1.pkg.tar.zst
Installing a cached package file is the standard Arch rollback
move when you have the prior artifact in
/var/cache/pacman/pkg.
:: Processing package changes...
:: Downgrading bash...
Downgrade requires the older artifact. On Debian systems, the target version must be available in sources. On Arch, the cache must contain the prior package file, or you need another trusted source for the older package.
The older version may not satisfy current dependencies. Treat this as a change-management decision: roll back a set of related packages together, or fix-forward to a corrected update.
If repos changed since the transaction (or packages are no longer available), undo may fail. Keep local mirrors or snapshot repos when rollback speed matters.
If symptoms remain, the cause may be config drift, database migrations, or service state. Validate service health, logs, and any post-update changes that are not reverted by package rollback.
This lab changes package state by design. After practicing, either return to your baseline version (upgrade back) or keep the downgraded state and document the exact versions as your known-good reference.
# Record installed version after rollback:
rpm -q bash || true
dpkg -l bash 2>/dev/null | head -n 5 || true
pacman -Qi bash 2>/dev/null | sed -n '1,12p' || true
The service stabilizes after rollback, and you can state exactly what version you reverted to and how you validated recovery.
rpm -Uvh --oldpackage <pkg.rpm>
: Install an older RPM version over a newer installed one.
--oldpackage: Allow downgrade.-U: Upgrade or install package.yum history undo last
: Revert the most recent yum transaction.
apt install <pkg>=<version>
: Install a specific version of a package (downgrade if needed).
pacman -U /path/to/pkg.tar.zst
: Install a local package file (commonly used for downgrades
from the pacman cache).
rpm -q <pkg>
: Query installed RPM package version.
dpkg -l <pkg>
: List Debian package status and version.
pacman -Qi <pkg>
: Show installed package details on Arch.