Score:2

Why does apt-get install recommended packages by default?

ls flag

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?

Artur Meinild avatar
vn flag
I believe this is an option you can configure for `apt` - whether or not it should install recommended packages by default.
guiverc avatar
cn flag
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`)
Felix F Xu avatar
ls flag
@David for example: https://packages.ubuntu.com/focal/libasio-dev
Felix F Xu avatar
ls flag
@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!
guiverc avatar
cn flag
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 avatar
cn flag
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 avatar
cn flag
Does this answer your question? [What is the simplest Debian Packaging Guide?](https://askubuntu.com/questions/1345/what-is-the-simplest-debian-packaging-guide)
Score:6
cn flag

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.

Score:2
cn flag

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").

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.