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.
More on Packages, Shell & Text Tools
Compare apt and dnf package management.BeginnerWhat is the difference between `apt upgrade` and `apt full-upgrade`?IntermediateHow do you find which package provides a file or command?BeginnerHow are repositories and their GPG keys configured?AdvancedWhat is the difference between a login shell and an interactive non-login shell?IntermediateWhat does `set -euo pipefail` do in a bash script?Intermediate