I've heard some packages being classified as a meta-package. So now I am left wondering what is the difference between a meta-package and a package?
5 Answers
From https://help.ubuntu.com/community/MetaPackages:
These packages do not contain actual software, they simply depend on other packages to be installed.
It is important to note that removing a meta package does NOT remove the packages it installed:
[...] when a metapackage is automatically removed by the removal or purging of any one, or more, of its underlying dependencies, all of the other packages that were in the metapackage's depends list are still installed on the system.
You can look at the structure of a typical meta-package by pulling (for example) ubuntu-desktop
:
apt-get source ubuntu-desktop
Looking at the structure, you'll find the list of packages each meta-package recommends, as well as the structure of putting it all together in debian/rules
.
References:
-
1What about update? If i update a metapackage, would the dependencies would also update? Apr 17, 2013 at 5:46
-
Would the dependency of a meta-package never itself be a meta-package?– SajuukJun 24, 2019 at 11:42
-
But when it's a metapackage, and it has a dependency, so it removes this dependency when I uninstall it, is it still a metapackage in this case?– QuidamApr 26, 2020 at 21:39
-
it's just a reference to a loosely grouped packages/dependencies provided/required for a specific software/package in order to work properly . if you were to uninstall this specific package , then the libraries/dependencies will be no longer need to exist on they system -unless some of them are required by another package to work- , they'll be deleted too . , but when you get a metapackage for a specific package i.e., entire DE to install all of it's required dependencies , then it just references them to be installed . Mar 12, 2021 at 12:00
-
if you were to remove one of these referenced packages , then the others remain because they don't correlate/depend on each other , they are collectively contributing to the ultimate package functionality . Mar 12, 2021 at 12:02
Metapackages are a link to existing package or packages. So they are essentially a script that installs other packages.They keep the packages as dependencies
Eg: the package ubuntu-desktop
installs all the packages needed for the Default UI for ubuntu. But uninstalling the same does not uninstall its dependencies
A meta-package pulls in other packages, and by definition should not do anything else.
A package usually has some sort of content (files, applications, documentation, a script, or such).
Simply said, a meta package has nothing in it, except empty docs. The only thing it has is metadata, which means that it can have dependencies, or conflicts etc...
Metapackage is not your regular package. It is a way to always install latest packages of a software. For example on ubuntu 'emacs' metapackage always installs the latest available version of emacs.