35

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?

2
  • If I may submit a very similar question was asked on another channel… …by me.
    – kojiro
    Oct 14, 2011 at 19:26
  • oh... i was just looking into askubuntu.com to see if the question had been asked before. Oct 14, 2011 at 23:56

5 Answers 5

29

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:

5
  • 1
    What about update? If i update a metapackage, would the dependencies would also update?
    – TheOneTeam
    Apr 17, 2013 at 5:46
  • Would the dependency of a meta-package never itself be a meta-package?
    – Sajuuk
    Jun 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?
    – Quidam
    Apr 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 .
    – polendina
    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 .
    – polendina
    Mar 12, 2021 at 12:02
15

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

0
5

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).

0
3

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...

0

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .