October 16, 2008

Debian: Mark packages on hold

If you have installed some Debian/Ubuntu package, that you don’t wanna update trough apt-get upgrades, you can put a flag HOLD to that package.

The HOLD flag will prohibit accessing that package by regular apt-get upgrade_s. To put a package on HOLD, use the following command:

echo {PACKAGENAME} hold | dpkg --set-selections

root@recorder:~# echo vlc hold | dpkg --set-selections
root@recorder:~# apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages have been kept back:
  vlc vlc-nox
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.