Interview Prep/Linux/Packages, kernel and boot

A package update broke an application. How do you roll it back?

IntermediateScenarioPackages, kernel and boot
Answer

Situation read → Downgrade to the previous version.

What I'd do →

  • RHEL:
sudo dnf history list
sudo dnf history info <ID>
sudo dnf history undo <ID>
# or: sudo dnf downgrade nginx-1.24.0-1.el9
  • Debian/Ubuntu: apt list -a nginx then sudo apt install nginx=1.24.0-2ubuntu1, then apt-mark hold nginx.

Why → dnf history undo reverses the whole transaction including dependencies.

Interview tip → The previous version must still be in the repo or cache, which is why internal mirrors keep old versions.

All Linux questions Roadmap: Linux

More on Packages, kernel and boot