24

Is there a term to refer to the subset of packages that is automatically installed by Debian distribution?

I though that it had something to do with packages priorities, but it doesn't seem to be the case, cause there are packages of all the priority levels among the packages installed by default.

Also, some of those packages of initial subset have automatically installed flag, e.g. wireless-tools. So they will be automatically removed if packages of the initial subset, depending on them, are manually removed. I wonder, does the installation tool keep only a list of packages to be considered manually installed and installs their dependencies automatically?

Answer to the first two questions: After installing the core Debian utilities, Debian installer seems to invoke tasksel to carry out installation "tasks". Among the typical tasks are "standard" task and "laptop" task. From tasksel page:

"standard" task

The standard task is a special task used by Debian Installer. It actually relies on the packages' priority. What does the "standard system" task include?

tasksel --task-packages standard

which is an aptitude search string that equates to

aptitude search ~pstandard ~prequired ~pimportant -F%p

So tasksel installs standard, required and important packages.

"laptop" task

The laptop task is a special task use by Debian Installer, to pull the packages useful on a laptop:

  • wireless-tools
  • acpi-support
  • cpufrequtils
  • acpi
  • wpasupplicant
  • powertop
  • acpid
  • apmd
  • pcmciautils
  • pm-utils
  • anacron
  • avahi-autoipd
  • bluetooth

Desktop

See https://wiki.debian.org/DebianDesktop/Tasks

8
  • @terdon ok, but how the installer decides, which packages to install in a particular case and which not? Sep 13, 2013 at 15:52
  • Well, if you have a touchpad, it will install a synaptics driver, if you don't it won't. I see what you're getting at but you should try an narrow your question down to those packages that are hardware agnostic.
    – terdon on strike
    Sep 13, 2013 at 15:52
  • @terdon Yes, but what part of installer takes the decision? I haven't found any words about that in the documentation. Sep 13, 2013 at 15:54
  • What do you mean? The installer probes your hardware and installs the appropriate software.
    – terdon on strike
    Sep 13, 2013 at 15:57
  • @terdon let's move to chat as soon as we overflow the comments, ok? I mean that debian manuals are very thorough on peculiarities of working systems, but functioning of the installer is omitted. E.g. I don't understand, why some packages, installed by it are marked automatic and some are not. Sep 13, 2013 at 16:01

2 Answers 2

25

The base system is described in Debian policy as all packages with required or important priority.

You can search for the packages that the required and important priorities are attached to with the aptitude utility.

aptitude search ~prequired -F"%p"
aptitude search ~pimportant -F"%p"

debootstrap installs these packages during the setup process.
tasksel will then install whatever other roles you choose on top, normally standard is the default selection that is used.

On top of what is listed in the base system you will get

  • A Kernel (thankfully)
  • Input/Locale/Dictionary packages.
  • Hardware packages. (ACPI, USB, PCI, Virtual guest additions on vm's)
  • Then some dependent libraries to support the above.

This amounts to about 60 packages on my VirtualBox VM (without the VBox guest additions which pull in a lot of dependencies).

Run the Expert Install (select "Advanced options > Expert") if you get a chance. It gives you a better idea of the step by step install process and when apt is being run outside of the base install.

8
  • Aha, the tasksel is the key! Thanks! By default it runs the "standard" task and usually the "laptop" task: wiki.debian.org/tasksel Sep 13, 2013 at 16:13
  • tasksel installs sets of extra packages at the end of the installation based on their Task: attribute and which tasks you select for installation. The required and important packages are installed in the first phase by debootstrap. The required packages are unpacked by hand, and represent the minimum requirements to be able to run dpkg to install the important packages, and then configure the required and important packages.
    – psusi
    Sep 13, 2013 at 17:10
  • How much more? there will be some stuff like the kernel, locales, grub. The biggest addition post base install I saw before selecting a role was that it picked up on being a Virtualbox guest and some dependancy creep for the guest additions got in.
    – Matt
    Sep 13, 2013 at 17:43
  • @psusi yeah i was just reading this as my install seemed to have another step before tasksel where it goes out to the net and fetches. I'm guessing pkg updates and some hardware detection but trying to confirm that
    – Matt
    Sep 13, 2013 at 17:51
  • @psusi guys, I just started going through "laptop" task packages and found that acpid is marked as manually installed, while wireless-tools as automatically. Do you understand the logic behind those decisions? Sep 13, 2013 at 19:21
4

Also, what about automatically installed status for those packages? They don't always get this flag, right?

All packages that are only installed because another installed package depended on them should have this flag. The package manager uses this flag to find unused/orphaned packages, that is, packages that are installed although there is no longer another package installed that depends on these packages. Such orphaned packages will be automatically removed.

For example, let's say you install the package exim4-daemon-light. This package depends on exim4-base, so the package manager has to install both of these packages on your system. The flags are then set like this:

  • exim4-daemon-light: not automatically installed, because you explicitly told the package manager to install it
  • exim4-base: automatically installed; you didn't explicitly tell the package manager to install it, but it had to install this package automatically because exim4-daemon-light depends on it

When you now tell the package manager to remove exim4-daemon-light, it uses the "automatically installed" flag of exim4-base to determine that this package can be removed too. It looks at the list of installed packages that depend on exim4-base, and if there are none, it will remove exim4-base.

This mechanism essentially ensures that your system doesn't keep unnecessary packages around.

You can modify the flag with the aptitude commands markauto and unmarkauto. This will have the following effects:

  • aptitude markauto: as soon as there are no longer any packages installed that depend on this package it will be automatically removed. If there aren't currently any packages installed that depend on this package, it will be removed immediately.
  • aptitude unmarkauto: the package will never be removed automatically, even if there are no packages installed that depend on it.

You must log in to answer this question.

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