Your two goals – to apt-mark hold
a deb-provided application AND do-release-upgrade
the system – are incompatible and thus mutually exclusive.
The usual solution is to install the application using some other method than a deb. Pick a method that provides you the control that you need.
- Example: If you compile the application yourself, you need not
apt-mark
it... but you might need to re-compile it for a newer release of Ubuntu as the apt-provided dependencies change.
Alternately, you can put your deb-provided application in a container environment that is compatible with the version you need.
Debian-based systems like Ubuntu are based around a design that all applications and OS services share a common set of dependencies. When you apt-mark hold
an application, you limit the updates of all of it's dependencies. And also thus all of the the applications that share those dependencies. Like a ripple in a pond, the single pebble (hold
) has a consequence for the entire system.
This design tradeoff – common dependencies at the expense of backward compatibility – solved several nasty problems for Debian about 20-25 years ago, and was a key design choice that made new Debian (and later Ubuntu) releases possible with the limited volunteer participation available.