In general - should I install the recommended packages along the package that I'm installing?
I'm sorry if this has been asked before, I searched using different terms but couldn't find a similar question. I'm a noob. When using apt install sometimes it recommends a bunch of other packages. I read that GUI tools generally install them. I don't use GUI, I use the terminal. I know of the --no-install-recommends flag, but I am wondering whether and when to use it. Should I just let it do the default thing?
For example, this is the list of packages when I try to install Calibre:
Some of them seem useful based on names, but for example blt-demo?
11 replies
Oh, I just realized those are suggested packages, not recommended packages! So I guess these are opt-in via
--install-suggests. But my question is still valid in general.No, the only things I install are what I pass to apt directly and any required deps for those packages.
I never do. But you could look through the list for anything that sounds related to whatever you're installing the package for, e.g. If you're installing a generic image processor and there is an extension for PDFs and you happen to be trying to process some PDFs, then there you go. By extension you could also research every recommended package but that feels like one heck of a rabbit hole to go down.
Let's see what installing a package does.
Installing packages is just putting files in your filesystem. Generally binaries, libraries and assets. Unless what you're installing is a headless service like openssh-server, those binaries libraries and assets are inert. They take storage space but don't do anything else. They don't get loaded on startup, they don't take CPU time or memory. They just sit there in case you or another program needs them. If storage space is not a problem, installing some additional (recommended or suggested) package doesn't cause any trouble. On the other hand, not having some additional package could cause a program you use to be less useful. E.g. missing a plugin or another program to invoke in order to fulfil some function. Like a video player might not be able to decode some video file without a codec lib that isn't installed. Unfortunately there's rarely info in the app telling you what package you need to install because the apps are often written without a particular distribution and package manager in mind. Debian maintainers know which package corresponds to which function. That's why recommended and suggested packages are useful.
Apart from the storage, more installed packages increase the risk of upgrade breakage, slightly. If all the packages are from the Debian repo, the risk is very small and usually a defect (someone missed something). If you install packages from third party repos, the risk is much higher. This is why one of the standard steps before upgrades is to disable third party repos and uninstall packages that came from those.
Personally I install the default way which installs recommended packages and I use third party repos only when absolutely necessary. For example having an older version of Docker in the Debian repo isn't a good reason to add the Docker.com repo and install their package. Needing a specific feature in Docker that isn't available in the older version from the Debian repo could be a reson to do it.
Thanks for the detailed answer.
Do you mean a full system upgrade?
I currently have a few third party repos added (like Firefox, Google Chrome, VS Code, etc). So far I've been upgrading them along all the other packages with apt.
Yes, full system upgrade, like from 12 to 13.
Regular non-release updates shouldn't break because the rest of the Debian packages are frozen to their versions at the time of the distro release and only security and bug fixes get shipped. So for example if VS Code needs libosmething 6.3 today and is incompatible with libsomething 7, libsomething 7 would never replace 6.3 on your system unless you do a full release upgrade. When you upgrade 6.3 could be replaced with 7 or 8 and the VS Code packe could say - wait this breaks me, then apt says - oh shit, we're gonna break VS Code - and it stops the release upgrade. And then you're left with a broken system mid-upgrade. Can be fixed if you know how but for newer users - that's a nuke-and-pave. Note that you can clone your system to another SSD and try a release upgrade to see if anything breaks. You could even so that in a VM but that's a bit more involved. I'm in the process of planning an upgrade from Ubuntu 22 through 24 to 26 and just did such a test. There was some breakage due to some orphaned packages that I have installed from god-knows-where. This system was last reinstalled in 2014. 😅
That's where Btrfs snapshots come in handy :) I was on openSUSE Tumbleweed just before this Debian install, but openSUSE gave me trouble with some software and a couple broken distro upgrades (which, in a rolling release, happen all the time — I upgraded once a week) not of my fault (they're in the process of some changes related to SELinux and my system was unable to upgrade due to some policies — I didn't tweak anything, it was annoying). So I switched to Debian and it's been smooth sailing. So far what they say has been true — it's rock stable, boring even :) Everything just works for me. But I have the default ext4 filesystem and although I do 3-2-1 backup, having automated recoverable snapshots was nice on openSUSE.
Yeah, root filesystem snapshots, whether it be Btrfs or ZFS def solve this. My laptop is Debian 13 on ZFS. Without that, as historically has been the case, one had to be more careful abt this. With snapshots, it's much easier. I was actually debating moving my Ubuntu system's root to ZFS prior to upgrade for this exact reason. Decided to go as-is (ext4 on LVMRAID) and try migrating root after the upgrade.
I don't even install recommends, let alone suggests.
I'm not sure which one the Polish sugerowane refers to (sounds like suggests), but zaleznosci I'm pretty sure means actual dependencies. There's lots of generic python stuff in there, I'm guessing this is a fairly fresh install and sooner or later many of them will get pulled in anyhow.
Yes, I think those are actually suggest. I caught that after I posted. So this screenshot is not the best example.
I pretty much also do no recommends no suggests and try to keep an eye on things that might be useful and work together. And still use debfoster to purge anything that isn't needed.
And I love that Debian doesn't force you to install masses of packages you don't want on your system like many other distributions.