Apt-get and its irritating lack of easy selective upgrades
One of my many irritations with
is that it doesn't easily allow you to only apply some of the pending
updates. Sure, often you want to apply all of the updates (at
least all of the unheld updates), but there
are any number of cases where you want to be more selective. Sometimes
you are in a rush and you want to apply only a few very urgent
updates. Sometimes you want to apply updates in a specific order,
updating some packages before others. Sometimes you want to apply
most updates but temporarily exclude some that you consider low
priority or disruptive.
With a package manager like
yum (or now
dnf) you can easily do
either of these. If you just want to exclude some packages, you do
that with '
--exclude'; if you only want to upgrade some packages,
you do that by supplying them as explicit arguments. And it's
harmless to be a bit broad in your explicit arguments, because
you're specifically only upgrading existing packages; you'll never
install new ones out of nowhere.
apt-get does not support this usage as far as I can see.
upgrade takes no package list and has no way of excluding some
packages; it is an all or nothing operation, where the only way you
have of being selective is to hold packages in advance in order to
block their upgrades. In order to upgrade packages selectively, you
must turn to '
apt-get install', probably with '
so that you don't accidentally install new packages. And as far as
I can tell this has no equivalent of yum's
--exclude, so there's
no easy way I can see of saying 'upgrade everything except the
apt-get install does at least support wildcards, or more exactly
POSIX regular expressions. I don't know why they decided to use
regular expressions instead of shell globbing, but it feels like a
very Debian decision, especially the detail that it defaults to
apt-get install --only-upgrade PKG ...' solves about half of the
problem (although clumsily) so I'm less disgruntled than I was at
the start of writing this entry, but it's still not particularly
Comments on this page:Written on 07 March 2016.