How to search from repositories for rpms to be installed without dnf in Silverblue

Hi
I’m using Fedora Silverblue hence there is no dnf command but rpm-ostree to install programs from their rpm (for those neither shipped by flatpak nor Gnome SoftWare).

Under Fedora Workstation I could, using dnf :

  • add repositories like rpmfusion:
    dnf -y install http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm
  • search/query repositories :
    dnf search gnome | grep extension

Under Fedora Silverblue, and the advantages of ostrees, the installation of rpms uses a different paradigm since rpm-ostree install would need to create a new ostree and a full system reboot

So, my questions:

  1. How do I add repositories to my Fedora installation database without having to install a rpm for it, the use case exemple here is rpmfusion since I need it to install e.g. video/audio codecs and many useful binaries ?

  2. How do I query theses repositories once they’ve been added with a command that would replace dnf search ?

Thanks for your help !

1 Like

Look here: Frequently Asked Questions (FAQ) :: Fedora Docs
" How can I check if an rpm software package is available in the repository?"

2 Likes

Thanks @alciregi

And here is the content to share with others having the same questions

Fedora Silverblue / FAQ
Go to:
How can I check if an rpm software package is available in the repository?

At this point in time, there is no rpm package search function built into rpm-ostree. However, you can use toolbox with the following command:

$ toolbox run dnf search <package>

What if you want to query what installed packages depend on another installed package? This is often needed to resolve dependency conflicts that block rpm-ostree upgrade

I don’t believe it is possible in a toolbox container because dnf looks at what’s installed in the container

python -m dnf.cli.main --help works;
I realized this tonight, after multiple years with rpm-ostree:

python -m dnf.cli.main -h
python -m dnf.cli.main search --help
python -m dnf.cli.main repoquery --help

python -m dnf.cli.main search kernel-core

python -m dnf.cli.main repoquery --whatdepends kernel-core
python -m dnf.cli.main repoquery --whatprovides kernel-core
python -m dnf.cli.main repoquery --provides kernel-core 

python -m dnf.cli.main repoquery --installed
python -m dnf.cli.main repoquery --userinstalled   #
python -m dnf.cli.main history list 0..1
for n in $(python -m dnf.cli.main history list | awk '{ print $1 }' | tail -n+3 | sort -n); do (set -x; python -m dnf.cli.main history store -o dnf_transaction.${n}.json "$n"); done  #

(set -e; for installroot  in /sysroot/ostree/deploy/fedora/deploy/*; do python -m dnf.cli.main --installroot="${installroot}" repoquery --installed; done)  # err: /var/tmp isn't writeable


python -m dnf.cli.main repoquery --whatprovides /bin/bash
python -m dnf.cli.main repoquery --whatprovides /etc/systemd


ls -al /usr/lib/python3.13/site-packages/dnf/cli/commands/search.py
python -m dnf.cli.main repoquery --whatprovides "$_"
rpm-ostree status --json | grep dnf
rpm-ostree status --json | jq '.' | grep dnf

rpm -qa | grep dnf | grep python3
rpm -ql python3-dnf

alias dnf='python -m dnf.cli.main'

# To list (security) updates with `python -m dnf.cli.main` :

alias dnf='python -m dnf.cli.main'
dnf updateinfo 
dnf updateinfo --help 
dnf updateinfo --updates 
dnf updateinfo --updates --list 
dnf updateinfo --updates --info 

dnf updateinfo --security --list
dnf updateinfo --security --info