dnf packages not removed on my final image

I'm running into an issue where some of my package listed in the remove section of the dnf module are still in my final image. I suspect that it's because these packages (fuzzel, alacritty and waybar in my case) are installed as a dependency of another package listed in the install section. I wonder if there is a way to run the remove section after the install section as a workaround for this issue. Another way would be to track down where these packages come from. I couldn't with just the bluebuild action logs, but I strongly suspect it is shipped with the niri package, I would appreciate it if someone can guide me to track down these packages (I don't really know much about rpm packaging ...) I attached portion of my logs showing the packages that should be removed and when they are installed afterward.
[09:38:29 g.i/b/niri-nvidia:latest] => #65 25.35 Removing packages:
[09:38:29 g.i/b/niri-nvidia:latest] => #65 25.35 - alacritty
[09:38:29 g.i/b/niri-nvidia:latest] => #65 25.35 - htop
[09:38:29 g.i/b/niri-nvidia:latest] => #65 25.35 - waybar
[09:38:29 g.i/b/niri-nvidia:latest] => #65 25.35 - firefox
[09:38:29 g.i/b/niri-nvidia:latest] => #65 25.36 - fuzzel
[09:38:29 g.i/b/niri-nvidia:latest] => #65 25.54 No packages to remove for argument: alacritty
[09:38:29 g.i/b/niri-nvidia:latest] => #65 25.54 No packages to remove for argument: waybar
[09:38:29 g.i/b/niri-nvidia:latest] => #65 25.54 No packages to remove for argument: fuzzel
[09:38:29 g.i/b/niri-nvidia:latest] => #65 25.35 Removing packages:
[09:38:29 g.i/b/niri-nvidia:latest] => #65 25.35 - alacritty
[09:38:29 g.i/b/niri-nvidia:latest] => #65 25.35 - htop
[09:38:29 g.i/b/niri-nvidia:latest] => #65 25.35 - waybar
[09:38:29 g.i/b/niri-nvidia:latest] => #65 25.35 - firefox
[09:38:29 g.i/b/niri-nvidia:latest] => #65 25.36 - fuzzel
[09:38:29 g.i/b/niri-nvidia:latest] => #65 25.54 No packages to remove for argument: alacritty
[09:38:29 g.i/b/niri-nvidia:latest] => #65 25.54 No packages to remove for argument: waybar
[09:38:29 g.i/b/niri-nvidia:latest] => #65 25.54 No packages to remove for argument: fuzzel
[09:38:33 g.i/b/niri-nvidia:latest] => #65 29.52 fuzzel x86_64 1.13.1-1.fc42 updates 307.3 KiB
[09:38:33 g.i/b/niri-nvidia:latest] => #65 29.52 fuzzel x86_64 1.13.1-1.fc42 updates 307.3 KiB
Thank you in advance for your help and all the effort you put in this project.
15 Replies
Lumaeris
Lumaeris2mo ago
are you sure you're on the latest update? one way of doing it is to run rpm-ostree update, if it says "No upgrade available." then probably you'll need to reboot if there's an update then let it do it's thing and reboot
Luke Skywunker
Luke Skywunker2mo ago
Maybe this would be a good opportunity to add a way to exclude packages when installing. Hmmm, there doesn't appear to be an arg for that with dnf
Lumaeris
Lumaeris2mo ago
dnf -x I saw it several times while looking at some containerfiles from ublue
Luke Skywunker
Luke Skywunker2mo ago
Oh shit you're right I was looking for --exclude or something looks like there isn't a long arg for it, just -x
Luke Skywunker
Luke Skywunker2mo ago
Ok so yeah I think that would be something to include in the spec and the module Nope I'm an idiot who can't read, --exclude does exist Ok, I'll make an issue to add this feature
Luke Skywunker
Luke Skywunker2mo ago
GitHub
feat: Add exclude under install property · Issue #460 · blue-...
A user was asking for a way to exclude certain packages from being installed. Since remove happens before install, we should make use of the --exclude/-x arg to exclude a list of packages when runn...
Lumaeris
Lumaeris2mo ago
happens 🤷‍♀️
benoit_lx
benoit_lxOP2mo ago
I was not when I read your message but I still have my unwanted packages in my image It would be great, but would it not be kind of redundant to have a remove and exclude section ? Also, is there a particular reason for not running the remove after install ?
Luke Skywunker
Luke Skywunker2mo ago
You could also try install-weak-deps: false
benoit_lx
benoit_lxOP2mo ago
will try !
Luke Skywunker
Luke Skywunker2mo ago
Remove happens first and will remove any packages that exist. The exclude would prevent the packages from even being installed
benoit_lx
benoit_lxOP2mo ago
Is there a way to confirm my unwanted packages were installed because of niri being installed ? The only reference I found in the niri copr is in niri.spec :
# Suggested utilities, bound in the default config
Recommends: alacritty
Recommends: fuzzel
Recommends: swaylock
Recommends: waybar
# Suggested utilities
Recommends: swaybg
Recommends: mako
Recommends: swayidle
# Suggested utilities, bound in the default config
Recommends: alacritty
Recommends: fuzzel
Recommends: swaylock
Recommends: waybar
# Suggested utilities
Recommends: swaybg
Recommends: mako
Recommends: swayidle
But since I don't know much about this file, I'm not sure what it implies. I will try to create a PR implementing the exclude feature, a draft should be available in the end of the day Indeed those packages are part of niri's weak dependencies
benoit_lx
benoit_lxOP4w ago
I think you can close this @gmpinder (sorry for the ping)
GitHub
feat: Add exclude under install property · Issue #460 · blue-...
A user was asking for a way to exclude certain packages from being installed. Since remove happens before install, we should make use of the --exclude/-x arg to exclude a list of packages when runn...

Did you find this page helpful?