8

I am interested in taking a list of packages and figuring out which packages are part of a meta-package. That way, if I reinstall a new system I can limit my install to just the top level packages I need.

Has anyone written a script to do this sort of thing?

wjandrea
  • 14,236
  • 4
  • 48
  • 98
  • Could you add just a bit more detail so that the question is 100% clear? I'm not sure exactly what you mean at the momment. – You'reAGitForNotUsingGit Aug 22 '16 at 20:10
  • what exactly did you not understand? – blake private_last_name Aug 22 '16 at 20:21
  • Well, the "...limit my install to just the top level packages" is rather vague. Generally, Ubuntu is not the best distro to avoid metapackages. Try something like Linux from scratch instead. – mikewhatever Aug 22 '16 at 20:39
  • Oh sorry, I apologize for not stating I run Ubuntu and am interested in no other distribution whatever.So, perhaps you can actually answer the question which I asked, no? It is instructive that I am NOT interested in avoiding meta-packages, but quite the reverse. I have a list of Ubuntu packages and am desirous of figuring which are part of any Ubuntu meta-packages, does that clarify my question? – blake private_last_name Aug 22 '16 at 20:56

3 Answers3

4

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

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.

Anwar
  • 76,649
0

To the best of my knowledge there is no script that will accomplish this (at this time). However, information regarding all the ubuntu packages is available here

This site provides you with information about all the packages available in the Ubuntu Package archive. You can search for the specific titles you are interested in and discover which packages contain them.

Elder Geek
  • 36,023
  • 25
  • 98
  • 183