How to determine which packages are part of a metapackage?

Solution 1:

What you need is the dependencies of this meta-package. Keep in mind that when you install a package or meta-package using the software center or using the command sudo apt-get intstall PACKAGE_NAME the recommendations are installed too. You need to use sudo apt-get install --no-install-recommends PACKAGE_NAME if you want to install only the dependencies.

Let's take for example the lxde meta-package:

  1. You can use the command:

    apt-cache depends lxde
    
  2. Or you can search for lxde at synaptic package manager and right-click on it then choose Properties and see the Dependencies tab.

  3. Finally, the best way, in my opinion, is to search the meta-package you want here: http://packages.ubuntu.com/. For our example, the lxde meta-package is here: http://packages.ubuntu.com/xenial/lxde. Here you see both dependencies and recommendations (even the suggestions which are not installed by default) and if you click on a package you see its dependencies. If you click at the bottom of the page at the list of files link you will see that the meta-package doesn't include any important files itself (just a changelog.gz and a copyright file), unlike an actual package.

Solution 2:

Let's first remove the confusion around the metapackage.

A meta-package is just an empty package which pulls other packages, but when removed, doesn't cause those pulled packages to get removed. The whole purpose of existence of these packages is to help get a selected set of packages. It helps greatly to install a complete Desktop Environment which provides a complete set of desktop applications.

See the question here What is the difference between a meta-package and a package?

You can easily see them in Synaptic -> Left-Panel -> Click Sections and Select Metapackages.

As for other types of packages, every single package that needs another package is a top level package. So, by definition there are thousands of them. Only the most basic packages are not top level package.

Hope that helps.