how to prevent a debian package from upgrading

in the following examples, the package name is "mutt".

to find the current status of packages:

dpkg --get-selections

or, for our example:

dpkg --get-selections | grep mutt

to put a hold on a package to prevent it from being upgraded:

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

to remove a hold on a package and allow it to be upgraded:

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

on a related note, to get a list of versions available for a package, and the repo’s for those versions:

apt-cache madison mutt

madison!? sheesh. how debian-like; yea, that makes a lot of sense.