Interview Prep/Linux/Packages, kernel and boot

You need to pin a package version so routine updates don't upgrade it (e.g. Docker or PostgreSQL). How?

BeginnerScenarioPackages, kernel and boot
Answer

Situation read → Version locking per package manager.

What I'd do →

  • RHEL: sudo dnf install 'dnf-command(versionlock)' then sudo dnf versionlock add docker-ce (dnf versionlock list, delete to remove).
  • Debian/Ubuntu: sudo apt-mark hold docker-ce (apt-mark showhold, unhold).

Why → Uncontrolled major upgrades of stateful software cause outages.

Interview tip → Remember to unhold for security patches; a forgotten hold is technical debt.

All Linux questions Roadmap: Linux

More on Packages, kernel and boot