The apt-mark command

show, set and unset various settings for a package 2 examples from the lessons of the IVski Linux Playground — try them in the terminal next to them.

Subcommands in the examples

apt-mark hold
hold is used to mark a package as held back, which will prevent the package from being automatically installed, upgraded or removed.
apt-mark unhold
unhold is used to cancel a previously set hold on a package to allow all actions again.

Examples

sudo apt-mark hold htop

Prevent htop from being upgraded

sudo apt-mark unhold htop

Lessons that use apt-mark