By giving a negative priority for this pin we will block the installation of <nameofpackage> from not further specified origin, i.e. our local repository. Of course we can use apt-pinning to pin a certain package version or specific origin.
Before you proceed it is strongly recommended to read the documentation given above and the manpage from apt_preferences because errors in these files are not checked by apt and if they occur may break your package management.
For an alternative, and to prevent updating of a given package see:
As in Debian we can use apt-pinning for version and installation control in Ubuntu too.
To block the installation of a given package we may put the following lines in
/etc/apt/preferences
By giving a negative priority for this pin we will block the installation of
<nameofpackage>
from not further specified origin, i.e. our local repository. Of course we can use apt-pinning to pin a certain package version or specific origin.Before you proceed it is strongly recommended to read the documentation given above and the manpage from apt_preferences because errors in these files are not checked by apt and if they occur may break your package management.
For an alternative, and to prevent updating of a given package see:
I have a package that keeps sneaking back in and breaking git
should prevent that package from being installed
In debian you can block a package, and that package wont upgrade anymore
but I'm not sure that you can forbid