2

On Ubuntu 18.04 (or 20.04, etc) will install recommended packages along with apt-get install, I understand that depended packages should be installed, but why recommended? who decides the recommendation?

But I guess there will be a valid reason, what are the reasons?

muru
  • 197,895
  • 55
  • 485
  • 740
Felix F Xu
  • 143
  • 6
  • I believe this is an option you can configure for apt - whether or not it should install recommended packages by default. – Artur Meinild Oct 13 '22 at 06:33
  • 3
    You have control, being able to --no-install-recommends if you like, --install-suggests etc... Refer to the reference manual page on your system (eg. man apt-get) – guiverc Oct 13 '22 at 06:35
  • @David for example: https://packages.ubuntu.com/focal/libasio-dev – Felix F Xu Oct 13 '22 at 06:37
  • @guiverc, I know the option, after several years of using Ubuntu. How many unnecessary packages have I downloaded and installed? I have to know the background logic of choosing the default value! – Felix F Xu Oct 13 '22 at 06:42
  • The packager decides on the rules; as best they understand the various rules they can comply with. For Ubuntu packages, some come direct from upstream Debian (thus follow Debian rules), some are packaged by Ubuntu teams (who follow Debian, Ubuntu rules plus the conventions of the source of the packages themselves; which maybe upstream GNOME, KDE etc). In the end the packager decides the rules; with it being reviewed prior to being accepted. Rules vary on package though & you've given no specific package. – guiverc Oct 13 '22 at 06:46
  • FYI: I don't see a direct duplicate question here to tag, all I could provide is packaging documentation (which covers the rules amongst the many others things in that doco) but any answer would need to be specific to a example package, otherwise it'd be too lengthy https://wiki.debian.org/Packaging https://packaging.ubuntu.com/ etc – guiverc Oct 13 '22 at 06:59

2 Answers2

6

There is no particular reason except, likely, to improve the experience of the average Ubuntu user. Installing both the app with the recommended packages immediately ensures that all the functionality is there out of the box. The user later does not have to discover missing something, that would require an additional, not essential package.

The more advanced user that wishes tighter control on what is being installed may create an alias to apt that includes the --no-install-recommends option, or change the setting system wide.

vanadium
  • 88,010
2

The person doing the packaging decides what is required, recommended, or suggested.

That person might be at Debian or might be at Ubuntu.

There are a number of guidelines in the Debian Packaging Guide to determine dependencies.

Oversimplifying the logic to clarify the reasoning: Those guidelines help the packager determine whether or not excluding the dependency will break the software entirely ("depends"), or merely break major features of the software ("recommends").

user535733
  • 62,253