Running dnf autoremove, should I be removing these packages?

, ,


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

Are you short on disk space? You will just save 607 KB ! If you remove it, it probably just will install on the next update.

Description : Microcode updates for AMD CPUs, ARM SEV amd TEE.

1 Like

I just have this inexplicable urge to remove stuff :sweat_smile:


Is there any way I can mark them not to be removed next time there is a legitimate reason to remove unneeded dependencies?

Is this correct: sudo dnf mark install amd-ucode-firmware for example?

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.


Tanks, it is nice to learn every day something new :blush:


I have done this already.

Thanks for the reply and confirmation!

1 Like

I have run:

$ rpm -q --whatrequires dbus-glib
no package requires dbus-glib

So I’ll be removing this one. Thank you!

1 Like

It should not be the case in Fedora 39 on x86_64:
Tree - rpms/linux-firmware -
Something seems broken here.


It’s not quite that simple:

$ rpm -q --provides dbus-glib
dbus-glib = 0.112-6.fc39
dbus-glib(x86-64) = 0.112-6.fc39

A package that uses a shared library will usually require the library soname directly, i.e. The dnf equivalent resolves that automatically by default:

dnf repoquery --installed --whatrequires dbus-glib

Of course, the result would probably have been the same in your case. dnf wouldn’t be offering to remove it otherwise.

1 Like

Thanks @chrisawi for the explanation! I appreciate it.

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
   Fedora Workstation product core
   Firefox Web Browser
   Guest Desktop Agents
   Hardware Support
   Printing Support
$ dnf group info "Fedora Workstation product core"
Group: Fedora Workstation product core
 Description: Packages mandatory for the workstation product.
 Mandatory Packages:
$ dnf repoquery --groupmember amd-ucode-firmware

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

EDIT: Don’t use this one, check below.

p.s. What is the friendly name of @standard?

I think I found what the case was for me[1], not sure about OP though. My install started from F39 Beta.

Yes there is! Not sure why this works though XD
Do we need to run dnf group upgrade from time to time now?

$ sudo dnf group upgrade "Fedora Workstation"
Installing group/module packages:

  1. ↩︎

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.

Yes I have, but dnf upgrade never prompted me for the install of amd-ucode-firmware.

2251053 – amd-ucode-firmware subpackage is not pulled as a dependency on x86_64