I just ran dnf autoremove to see if there are unneeded dependencies on my system which could be removed. This is the output:
$ sudo dnf autoremove
Package Arch Version Repository Size
Removing:
amd-ucode-firmware noarch 20231111-1.fc39 updates 236.2 KiB
dbus-glib x86_64 0.112-6.fc39 fedora 370.4 KiB
Transaction Summary:
Removing: 2 packages
After this operation 607 KiB will be freed (install 0 B, remove 607 KiB).
Is this ok [Y/n]: n
Operation aborted by the user.
I am not sure if I should be removing these.
I am on Fedora 39 (upfraded from 38) and the machine has a AMD processor.
amd-ucode-firmware is a dependency of linux-firmware. You should have linux-firmware installed on any bare metal installation; fix that and dnf shouldn’t want to remove it anymore.
dbus-glib is an obsolescent library. It can safely be removed if nothing uses it. In the default Workstation package set, it seems to be pulled in by firefox and thermald.
It’s just a weak dependency. If, for some reason, autoremove wants to remove it (it doesn’t, in my case), I’d suggest explicitly marking it as wanted with sudo dnf mark install amd-ucode-firmware.
A package that uses a shared library will usually require the library soname directly, i.e. libdbus-glib-1.so.2()(64bit). The dnf equivalent resolves that automatically by default:
I also have the same problem about the amd-ucode-firmware. I probably dnf autoremove’d it in the past. What’s the correct thing to do? Why does dnf want to autoremove it?
Currently, I see amd-ucode-firmware is a mandatory package of Fedora Workstation product core(@workstation-product), which is a mandatory group of Fedora Workstation. In theory it shouldn’t be autoremoved?
dnf commands
$ sudo dnf group list --installed
Installed Environment Groups:
Fedora Workstation
Installed Groups:
Container Management
$ dnf group info "Fedora Workstation"
Environment Group: Fedora Workstation
Description: Fedora Workstation is a user friendly desktop system for laptops and PCs.
Mandatory Groups:
Common NetworkManager Submodules
Container Management
Core
Fedora Workstation product core
Firefox Web Browser
Fonts
GNOME
Guest Desktop Agents
Hardware Support
LibreOffice
Multimedia
Printing Support
base-x
$ dnf group info "Fedora Workstation product core"
Group: Fedora Workstation product core
Description: Packages mandatory for the workstation product.
Mandatory Packages:
amd-gpu-firmware
amd-ucode-firmware
dnf
intel-gpu-firmware
linux-firmware
microcode_ctl
nvidia-gpu-firmware
sudo
systemd-udev
tar
xorg-x11-drv-libinput
...
$ dnf repoquery --groupmember amd-ucode-firmware
amd-ucode-firmware-20231111-1.fc39.noarch
@standard
@workstation-product
Anyway, is there a way to restore just this one package?
I have removed some GUI packages from the product core, if I dnf group install "Fedora Workstation product core" they (and the giant list of dependencies) all want to come back.
Is manually installing and changing mark the right way to do this? I still don’t quite understand how dnf can change package to group mark without knowing which group it belongs to.
sudo dnf install amd-ucode-firmware
sudo dnf mark group amd-ucode-firmware
Do you have linux-firmware installed? As discussed above, it should have a hard dependency on amd-ucode-firmware in F39, changing to Recommends in F40.