Bash-apt-hold

From I Will Fear No Evil
Revision as of 12:21, 20 October 2021 by Chubbard (talk | contribs) (Created page with "Basic examples of both kernel pinning as well as how to hold a package at a specific release * Do not allow kernel updates <pre> for i in $(dpkg -l "*$(uname -r)*" | grep ima...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Basic examples of both kernel pinning as well as how to hold a package at a specific release

  • Do not allow kernel updates
for i in $(dpkg -l "*$(uname -r)*" | grep image | awk '{print $2}'); do echo $i hold | dpkg --set-selections; done
  • pin a package to the installed version
echo "package name" hold | dpkg --set-selections