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