In the question What is “dist-upgrade” and why does it upgrade more than “upgrade”? the accepted answer explains that linux-headers-3.0.0-13
is a new package replacing linux-headers-3.0.0-12
.
How is it a new package and not simply a new version, and how to know (recognize) the difference?
Further, why is linux-headers-3.0.0-13
listed in the output of the command sudo apt-get upgrade
if it is a new package and not a new version of an already installed package?
The answer hints at the argument that it is because linux-headers-3.0.0-12
and linux-headers-3.0.0-13
are connected to the same virtual package ("linux-headers
is a virtual package that is provided by both linux-headers-3.0.0-12
and linux-headers-3.0.0-13
"). Is it for this reason that linux-headers-3.0.0-13
is listed? And if so, why don't we see other packages provided by other virtual packages suggested as upgrades?
EDIT:
Although the example above concerns kernel packages, my question is not kernel-oriented but more general; or is it of kernel-only relevance?
The reason of having kernel meta-packages like
linux-image-generic
andlinux-headers-generic
pointing to real kernel packages is to allow having more than one instance of a kernel.You can have
linux-headers-3.0.0-13-generic
andlinux-headers-3.0.0-12-generic
installed at the same time.When you upgrade meta
linux-headers-generic
, it pulls the latest real package as a dependency. If we had these kernel packages as one with different versions, it would be always replaced.apt-get upgrade
doesn't install new packagesThat's why it doesn't upgrade meta packages that are dependent on new packages.
It is not kernel related. There are some other examples.
Different packages have different names. Different versions of the same package have the same package name and different version numbers. You can see your installed packages and their version numbers with, e.g.,
apt list --installed
:Here I have three installed packages whose names contain
linux-image
:linux-image-4.18.0-14-generic
version4.18.0-14.15
,linux-image-4.18.0-15-generic
version4.18.0-15.16
, andlinux-image-generic
version4.18.0.15.16
. In particular,linux-image-4.18.0-14-generic
andlinux-image-4.18.0-15-generic
are different names, so they are different packages. Don't be fooled by how similar the names are, the point is that they are not the same. They might as well be namedfoo
andbar
.Also, in the file names of
.deb
packages, the package name and version number are typically separated by underscores: