6.4.6 Holding older packages
For example, holding of libc6 and libc6-dev for
dselect and aptitude install package can
be done as follows:
# echo -e "libc6 hold\nlibc6-dev hold" | dpkg --set-selections
aptitude install package will not be hindered by this
"hold". To hold a package through forcing automatic downgrade for
aptitude upgrade package or aptitude
dist-upgrade, add the following to /etc/apt/preferences:
Package: libc6
Pin: release a=stable
Pin-Priority: 2000
Here the "Package:" entry cannot use entries such as
"libc6*". If you need to keep all binary packages
related to the glibc source package in a synchronized version, you
need to list them explicitly.
The following will list packages on hold:
dpkg --get-selections "*"|grep -e "hold$"