I know about pinning packages with Apt. That's not what I want to do. Other questions have been answered with either using pinning or by using pins temporarily. I don't want to do this.
What I want to do is keep packages back the same way the kernel has been:
# apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages have been kept back:
linux-generic-pae linux-headers-generic-pae linux-image-generic-pae
The following packages will be upgraded:
I want to add tomcat-*
and mysql-*
and sun-*
to this list. In the past, there was a configuration parameter to do this. I've always thought it was something like Apt::Get::HoldPkgs
or Apt::HoldPkgs
but I can't find it.
I want to have these packages held from updates until I specifically request them with an apt-get install
.
I found the apt-get
configuration Apt::NeverAutoRemove
. Will this do what I want?
Added Question: I notice that Apt::NeverAutoRemove
and Apt::Never-MarkAuto-Sections
(among others) are not documented so far as I can see. They're not in the manpages. Neither is aptitude::Keep-Unused-Pattern
and aptitude::Get-Root-Command
.
Is there any comprehensive and complete documentation for apt.conf
?
The answer is to use
dpkg --set-selections
. If you run the commanddpkg --get-selections
you can see what is set already:Consider, in this case, the package
dnsutils
:Now let's change it - put the package on hold:
Check the results:
Try the update again:
Now,
dnsutils
- and its related packages - are being held back, just as we wished.Man page from APT-MARK