Putting packages on hold with apt on Debian


This will make that package stay stuck in that version so you will have to take it off hold if you want to upgrade it:

echo "package hold" | dpkg --set-selections

 

Alternatively use:

apt-mark hold package

 

To take a package off Hold:

echo "package install" | dpkg --set-selections

 

Alternatively use:

apt-mark unhold package

 

To list packages on hold:

dpkg --get-selections | grep hold