Hide i686 packages from dnf output?

Out of curiosity. Is there a way to tell dnf to ignore/hide i686 packages?

I run Fedora 34 x86_64 and I’m only interested in the x86_64 or noarch packages in the output of dnf list or dnf search.
There is no real problem that I am trying to solve here. It’s purely cosmetic. I would rather not append | grep -v i686 to dnf commands every time.

I know that there are some circumstances where one has to install 32-bit dependencies. But all the packages I install are either 64-bit, noarch or Flatpaks.

I find that most times I do not see any i686 packages with using dnf. Also, since the i686 packages are only pulled in when they are dependencies while installing a new piece of software it seems seldom that new ones get installed.

It is possible that you may have some unneeded i686 packages already installed that can contribute to the displays you are seeing.

I know of no way to hide the available i686 packages from dnf when doing a list or search except by using an exclude clause such as (–exclude=‘*i686*’), but it is easy to see which ones are already installed with
dnf list ‘*’ installed | grep i686

I have never intentionally installed any i686 packages except steam and I find 8701 i686 packages on my system (f33) which has been in use and upgraded regularly for the past 5 years (reinstalled clean with f31). These include some systemd, wayland, wxGTK, etc., packages so apparently many are still used.

repoquery with --arch can also be used.
sudo dnf rq --arch=x86_64,noarch light*
As an example (might be more typing)

You could define aliases for these
alias rq64="sudo dnf rq --arch=x86_64,noarch"

and use those.

2 Likes

Adding exclude under the main section in /etc/dnf/dnf.conf worked for me:

[main]
exclude=*.i686

Hi - I wonder though, if someone does have some i686 packages installed (ex. for Steam/Wine) that need updated, would that exclude comment cause them to skip being updated?

1 Like

Possible. I know I don’t need any currently. Someone who does might want to try and report back.

The best solution would be for dnf to stop showing these unless asked, but this will do in the meantime.

The exclusion probably would prevent installing or updating any .i686 packages so yes, it probably would prevent installing steam and the like that rely on 32 bit software.

If you have any .i686 library packages installed you may get update conflicts if you exclude .i686. The 32 bit and 64 bit library packages must be upgraded together.

1 Like

This is a necro thread that is more than 3 years old. I am closing it.