Metapackage linux-firmware change requires all firmware packages

So Ubuntu recent linux-firmware metapackage update brings in all linux-firmware* packages.

If you want to keep the status quo before that, then it seems, that a workaround is to install linux-firmware-minimal metapackage which replaces the linux-firmware package and keeps only needed firmware packages…

What happened is they broke the firmware into smaller individual pieces, and turned linux-firmware into a meta-package that depends on these. Extra firmwares were not added, it just involves separate packages now. This matches what 26.04 uses. This allows for smaller updates to specific firmware as needed, as opposed to needing to update one large package each time there is only a small update. The previous monolithic package is quite huge.

It is nice that there is a minimal option now, though.

Edit:
Actually, both linux-firmware-minimal and linux-firmware have identical dependencies. One has depends and the other has them as recommends, but since Ubuntu installs recommends by default, the end result is the same.

This allows one to remove unneeded firmware packages if desired.

In this case, you’d probably want to install the linux-firmware-minimal meta-package before upgrading to the 26.04 base, as the main linux-firmware meta-package would get removed when doing any trimming. This minimal package satisfies the linux-firmware dependency higher up the chain.

what would be the actual process?

install minimal, then remove the main, then just autoremove?

or do i need to manually remove anything i don’t need (and how would i know?)

Basically.

Installing linux-firmware-minimal first will replace the linux-firmware package (and vice-versa), so it saves you that step here.

It also keeps the other firmware packages from being marked as autoremove-able. This makes it less scary-looking and avoids accidents from those who run apt-autoremove regularly. If you didn’t, it would look like this:

$ sudo apt remove linux-firmware-marvell-prestera
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Starting pkgProblemResolver with broken count: 1
Starting 2 pkgProblemResolver with broken count: 1
Investigating (0) linux-firmware:amd64 < 20240318.git3b128b60.0ubuntu3.1 @ii mK Ib >
Broken linux-firmware:amd64 Depends on linux-firmware-marvell-prestera:amd64 < 20240318.git3b128b60-0ubuntu3.1 @ii pmR >
  Considering linux-firmware-marvell-prestera:amd64 10001 as a solution to linux-firmware:amd64 0
  Removing linux-firmware:amd64 rather than change linux-firmware-marvell-prestera:amd64
Done
The following packages were automatically installed and are no longer required:
  firmware-sof-signed linux-firmware-amd-graphics linux-firmware-amd-misc linux-firmware-broadcom-wireless
  linux-firmware-intel-graphics linux-firmware-intel-misc linux-firmware-intel-wireless linux-firmware-marvell-wireless
  linux-firmware-mediatek linux-firmware-mellanox-spectrum linux-firmware-misc linux-firmware-netronome
  linux-firmware-nvidia-graphics linux-firmware-qlogic linux-firmware-qualcomm-graphics linux-firmware-qualcomm-misc
  linux-firmware-qualcomm-wireless linux-firmware-realtek
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED
  linux-firmware linux-firmware-marvell-prestera
0 to upgrade, 0 to newly install, 2 to remove and 0 not to upgrade.

But as linux-firmware-minimal only has these as recommends, it takes care of that:

$ sudo apt remove linux-firmware-marvell-prestera
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Starting pkgProblemResolver with broken count: 0
Starting 2 pkgProblemResolver with broken count: 0
Done
The following packages will be REMOVED
  linux-firmware-marvell-prestera
0 to upgrade, 0 to newly install, 1 to remove and 0 not to upgrade.
After this operation, 74.8 MB disk space will be freed.
Do you want to continue? [Y/n] 

Remove a thing and see if anything stops working?
These are the same exact firmwares installed on *buntu desktops for ages, as well as similar actions on other distros, and supposedly are the most common or widely needed. I don’t think removing them does much more than save some disk space, but I could be wrong.

So, unless you know what you want and can remove, and need moar space, most of us can leave things as they are.

i see, thank you.

i’m just going to leave linux-firmware installed while i upgrade to to 26.04 and not try to remove any of the sub packages, then.

Yes, linux-firmware-minimal just replaces the linux-firmware metapackage and does not have requirements to all linux-firmware* packages so just saves the “status quo” if no-recommends is used.

Forgot to mention, that my neon installation has no-recommends set as a default behavior.

If I had gone with the linux-firmware package upgrade way, then more than half a gigabyte additional linux-firmware-* packages would have been added to my installation.

Which of the firmware packages did you keep after the firmware re-shuffle, out of curiosity? I wouldn’t be able to gain even than half of that ~600mb on my hodge-podge PC, but more, of course on my all-intel laptop.

I did not change anything except replacing linux-firmware with linux-firmware-minimal which is the only linux-firmware-* package installed. If I try to remove it with --autoremove switch, then the following packages will be removed: amd64-microcode bpfcc-tools bpftrace firmware-sof-signed intel-microcode iucode-tool libbpfcc libc-dev-bin libc-devtools libc6-dev libcrypt-dev libdbus-glib-1-2 linux-firmware-minimal linux-generic-hwe-24.04 linux-headers-generic-hwe-24.04 linux-image-generic-hwe-24.04 linux-libc-dev manpages-dev python3-bpfcc python3-netaddr rpcsvc-proto thermald ubuntu-kernel-accessories

Edit: This is Dell Optiplex 3090.

but:

Is that correct, that installing the package linux-firmware-minimal then wants to be uninstalled? Something is off.

I only use --no-install-recommends manually when I feel the need to, I wonder if setting this for the whole system might cause something like this? I have no idea why this is also removing your kernel meta-packages, which is kind of important but not damaging or anything.

Sorry for the confusion. linux-firmware-minimal is not autoremovable. sudo apt remove --autoremove linux-firmware-minimal - just to study what packages are dependencies for that. If I just try to remove linux-firmware-minimal package (without autoremove), then the only dependencies to be removed are the 2 hwe packages: linux-generic-hwe-24.04 and linux-image-generic-hwe-24.04. The other autoremovable packages were probably installed by the installer program (after probing the hardware etc).

i’ve set those hwe packages to manual so they are caught by autoremove.

i assume the reason the system is ready to remove them is that they are not a dependency of anything else… but they are importantant to ME.