1

If I try to install metapackage apt-get install lubuntu-desktop and then see the output of apt-mark showmanual | grep lubuntu I see much more than just lubuntu-desktop:

lubuntu-artwork
lubuntu-core
lubuntu-deskto

So, apt-get install lubuntu-desktop marks as manually installed not just the package lubuntu-desktop but also it's dependencies or something. But I don't need those packages directly and this behaviour is weird and unexpected.

Is there any way to configure apt to mark as manually installed just those packages I install by hands, not with their dependencies or something like that?

2
  • So... You know lubuntu-desktop is not a single package, but a group of packages, right? Dec 27, 2015 at 13:17
  • @EduardoCola no, I did not. Where can I read about groups of packages and how do they differ from just empty packages with dependencies?
    – s9gf4ult
    Dec 27, 2015 at 13:43

2 Answers 2

2

Quick search through apt sources gave me (1). As far as I understand, packages which are in section listed in APT::Never-MarkAuto-Sections, when installed mark their immediate dependencies as manual. So that installing a metapackage which required, for example, browser, then removing the metapackage leaves the browser installed. This seems to be intended behavior. Should be possible to change by clearing the default APT::Never-MarkAuto-Sections value.

(1) http://sources.debian.net/src/apt/1.1.9/apt-pkg/depcache.cc/?hl=849#L843

1
0

From Ubuntu:

Package Dependencies

Programs often use some of the same files as each other. Rather than putting these files into each package, a separate package can be installed to provide them for all of the programs that need them. So, to install a program which needs one of these files, the package containing those files must also be installed. When a package depends on another in this way, it is known as a package dependency. By specifying dependencies, packages can be made smaller and simpler, and duplicates of files and programs are mostly removed.

When you install a program, its dependencies must be installed at the same time. Usually, most of the required dependencies will already be installed, but a few extras may be needed, too. So, when you install a package, don't be surprised if several other packages are installed too - these are just dependencies which are needed for your chosen package to function properly.

As per your question,

lubuntu-desktop depends on the following:

lubuntu-artwork lubuntu-core lubuntu-desktop ...

Thus, the command sudo apt-get install lubuntu-desktop installs them as well. It's inevitable.

EDIT: From Ubuntu:

apt-mark

       apt-mark will change whether a package has been marked as being
       automatically installed.
       When you request that a package is installed, and as a result other
       packages are installed to satisfy its dependencies, the dependencies
       are marked as being automatically installed. Once these automatically
       installed packages are no longer depended on by any manually installed
       packages, they will be removed by e.g.  apt-get or aptitude.

showauto

       showauto is used to print a list of automatically installed
       packages with each package on a new line. All automatically
       installed packages will be listed if no package is given. If
       packages are given only those which are automatically installed will be shown.

showmanual

       showmanual can be used in the same way as showauto except that it
       will print a list of manually installed packages instead.

It already says in the manpages, that it will also include its dependencies.

8
  • I am talking about marking packages as manually installed (see man apt-mark), not about installing dependencies. From man: manual is used to mark a package as being manually installed, which will prevent the package from being automatically removed if no other packages depend on it.. So when I install lubuntu-desktop other packages are also marked as installed manual, which is unexpected as I said. Your answer is not related to question.
    – s9gf4ult
    Dec 27, 2015 at 13:32
  • @s9gf4ult - Edited
    – Raphael
    Dec 27, 2015 at 13:42
  • It already says in the manual, that it will also include its dependencies. Documentation says, that the dependencies are marked as being automatically installed But in my case dependencies are marked as installed manually, not automatically. This is the pint.
    – s9gf4ult
    Dec 27, 2015 at 13:52
  • @s9gf4ult - Automatically for showauto and manual for showmanual
    – Raphael
    Dec 27, 2015 at 13:54
  • @s9gf4ult - you did install lubuntu manually by typing sudo apt-get install lubuntu-desktop right?
    – Raphael
    Dec 27, 2015 at 13:56

You must log in to answer this question.

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