Interview Prep/Linux/Packages, Shell & Text Tools

How do you pin or hold a package version?

IntermediateConceptPackages, Shell & Text Tools
Answer
sudo apt-mark hold containerd.io        # Debian/Ubuntu
apt-mark showhold
sudo apt install nginx=1.24.0-2ubuntu7  # install a specific version

sudo dnf install 'dnf-command(versionlock)'
sudo dnf versionlock add kernel-6.*     # RHEL
dnf versionlock list

We hold kubelet/kubeadm/kubectl and container runtimes so routine patching does not upgrade them unexpectedly.

All Linux questions Roadmap: Linux

More on Packages, Shell & Text Tools