Skip to content




fedrq - Simplified repository querying


<fedrq | python -m fedrq> QUERY TYPE [OPTIONS] [PACKAGE...]

<fedrq | python -m fedrq> QUERY TYPE [OPTIONS] <-i|--stdin>

<fedrq | python -m fedrq> check-config [--dump] [--debug]

<fedrq | python -m fedrq> formatters [FORMATTERS OPTIONS...]


fedrq is a tool to simplify querying the Fedora and EPEL repositories.


check-config Verify fedrq configuration. Only has --debug and --dump to dump the config. --dump requires tomli-w.
pkgs Find the packages that match a list of package specs. Allows --whatprovides-like functionality with the --resolve-packages flag.
subpkgs Find the subpackages provided by a list of SRPMs. Doesn't support a --src flag, because subpkgs aren't SRPMs.
whatenhances Find the packages that Enhance [PACKAGE...]
whatrecommends Find the packages that Recommend [PACKAGE...]
whatrequires Find the packages that Require [PACKAGE...]
wr Alias for whatrequires
whatrequires-src Find the packages Require the subpackages of [PACKAGE...]. [PACKAGE...] must be source package(s).
wrsrc Alias for whatrequires-src
whatsuggests Find the packages that Suggest [PACKAGE...]
whatsupplements Find the packages that Supplement [PACKAGE...]
make-cache Load the repodata for the current branch/repo config
download Download an RPM from the repos. No GPG checking is performed.
download-spec Download an (S)RPM and extract its specfile. No GPG checking is performed.



-h, --help

Show help message and quit. Can be used after a command to get more information it.


These options have the same meaning across multiple subcommands.

-i, --stdin

Read package names from stdin. Cannot be used when passing positional [PACKAGE...].

-b BRANCH NAME, --branch BRANCH NAME (default: rawhide)

Distribution release. This matches distgit branch names by convention. See BUILTIN RELEASES for the releases available out of the box. Extra configurations may be specified by the user. The chosen release impacts what the value of $releasever and which repositories will be enabled by default.

-r REPO CLASS, --repo REPO CLASS (default: @base)

Enable REPO CLASS and disable all others for this operation. REPO CLASS can be a standard repoid that's configured in /etc/yum.repos.d or a custom one specified in a ReleaseConfig's defpaths (see fedrq(5)). In addition, release-specific repo groups and generic release class macros (e.g., @copr) are accepted. When --repo isn't specified, the repositories in a Release's @base repo group are selected. See REPO CLASSES for more information.

-e REPO CLASS, --enablerepo REPO CLASS

Enable certain repositories for this operation. All repositories in the system configuration and any fedrq repo classes are accepted. The option can be specified multiple times. Accepts comma separated values. See REPO CLASSES.

-l <integer|"all">, --latest <integer|"all"> (default: 1)

How many package versions to show for a given name.arch. By default, only the latest is included.

NOTE: dnf repoquery includes all by default.

-F, --formatter <str> (default: plain)

How the output should be formatted. This is similar to dnf repoquery --qf but more limited. All Package attributes from dnf repoquery --querytags are supported. Some custom formatters are also available. See FORMATTERS for a list.


Enable debug logging. Useful for development or bug reporting.

-P, --resolve-packages

Resolve the correct Package when given a virtual Provide or file path. For instance, /usr/bin/yt-dlp would resolve to yt-dlp.

-A <str>, --arch <str>

Only include packages that match this arch. This does not apply --forcearch.

NOTE: Unlike other tools, the -source repositories are always enabled. You need to filter out src packages if you don't want them in the output.

-s, --src

Equivalent to --arch=src.

NOTE: The semantics of this option are different than dnf repoquery's version. Our --arch does not affect the way the input is handled. In dnf repoquery, --arch=src effectively disables querying for source packages that depend on a virtual Provide of the input packages, because arch filtering is applied when resolving the input packages' virtual Provides and files.

-S, --notsrc

Equivalent to --arch=notsrc. This is a pseudo arch that does not exist in rpm. It includes noarch and the system architecture. It does NOT include multilib.

--forcearch ARCHITECTURE

Query a foreign architecture's repositories

-B <dnf|libdnf5>, --backend <dnf|libdnf5>

Which package manager backend to use. By default, fedrq uses dnf and falls back to libdnf5. Set -B / --backend to make an explicit choice. If you explicitly choose a backend whose dependencies are not met on your system, fedrq will not fallback to another one.

-L <always|auto|never>, --filelists <always|auto|never> (default: auto)

Whether to load filelists. By default, filelists are only loaded when using the files formatter (i.e. -F files or -F json:files). This only applies when using the libdnf5 backend or newer versions of dnf4, which do not load filelists by default to save memory and bandwidth. dnf < 4.19.0 always loads filelists.

whatrequires, whatrecommends, whatsuggests

-X, --exclude-subpackages

Filter out reverse dependencies that are built from the same source package as any of the input packages. See the whatrequires EXAMPLES.


-M PATTERN, --match PATTERN (can be repeated to match against multiple patterns)

Only show subpackages whose name matches this string. Glob patterns are permitted. When specified multiple times, any match is included.

download and download-spec

-o PATH, --destdir PATH

Directory in which to download/extract files. Defaults to the current directory.


The formatters subcommand lists available formatters. By default, all available formatters are shown, but they can be filtered by passing one or more of the following options.

--attrs, --only-attrs

Only list package attributes

--formatters, --only-formatters

Only list regular formatters

--special-formatters, --only-special-formatters

Only list special formatters (i.e., formatters that accept their own arguments)


Package attributes

This list is non-exhaustive. See fedrq formatters --attrs.

-F name

Show package names
(example line: yt-dlp)

-F arch

Show package arches only
(example line : noarch)

-F repoid

Show package's repo.
(example line: updates-testing)

Regular formatters

-F na

Show package name.arch
(example line: yt-dlp.noarch)

-F nv

Show package name-version
(example line: yt-dlp-2022.11.11)

-F nev

Show package name-epoch:version
(example line: bind-32:9.18.8)

-F source

Package queries can include source and binary RPMs. The source formatter combines and deduplicates all of the source names. For example, if python3-setuptools.noarch is in the result, it'll become python-setuptools. If python-setuptools.src is also in the result, it'll become python-setuptools, but python-setuptools won't be duplicated in the output.

-F breakdown

Only supported by fedrq --whatrequires. Shows a breakdown of runtime and buildtime dependencies.

Special formatters

"Special formatters" accept arguments.

-F json:[comma separated list of Package attrs]

Return an array of objects containing the specified Package attributes. The JSON output is formatted with indent=2. The output can be piped to jq.

-F line:[comma separated list of Package attrs]

Return the specified package attributes on a single line.
NOTE: The attributes provided must fit on one line. Attributes such as files or requires that contain a list of items are not supported by the line formatter. See -F multiline for that usecase.

-F multiline:[single line attribute],[multiline attribute]

Display two package attributes together.
(example call: -F multiline:name,files)
(example line: yt-dlp : /usr/bin/yt-dlp)

-F plainwithrepo

Show default format and repoid separated by space:
(example line: yt-dlp-2023.01.06-2.fc38.noarch rawhide)

-F nevrr

Alias to plainwithrepo formatter.

-F requiresmatch:[comma- or semicolon-separated list of packages]

List the Requires of [package ...] that resolve to the list of packages provided to requiresmatch. For example, python3dist(ansible-core) resolves to requiresmatch:ansible-core.

-F rm:[comma- or semicolon-separated list of packages]

Alias for -F requiresmatch

-F na-requiresmatch:[comma- or semicolon-separated list of packages]

Combine the -F na and -F requiresmatch on a single line. See the whatrequires EXAMPLES for usage.

-F narm:[comma- or semicolon-separated list of packages]

Shortcut for -F na-requiresmatch

-F source+requiresmatch:[comma- or semicolon-separated list of packages]

Combine the -F source and -F requiresmatch on a single line.

-F source+rm:[comma- or semicolon-separated list of packages]

Shortcut for -F na-requiresmatch

There are also requiresmatch-src / rmsrc and na-requiresmatch / narmsrc formatters that work similarly to their non-src conterparts, expect they take a list of source packages. The list of source packages is converted into a list of binary packages (like the subpkgs subcommand) and then processed in the same way. If, say, a source package named foo has foo, foo-devel, and foo-static subpackages, -F rmsrc:foo is equivalent to -F rm:foo,foo-devel,foo-static


The following generic repo class macros are available for all releases:

@file:[url or local path]

Load a .repo file from a local path or a url. Repositories with enabled=0 won't be loaded unless they are enabled explicitly with --enablerepo.


Load a repository from [url]. gpgcheck will be disabled.


Load a repository from url and set its gpgkey to [gpgkey]

@copr:[user/name] or @copr:[@group/name]

Load a Copr repository. The Copr instance defaults to but may be configured in fedrq's configuration. copr_chroot_fmt must be specifced in the selected branch's release configuration for this repo class to work. This is configured for the builtin releases.

@copr:[user/name@copr_baseurl] or @copr:[@group/name@copr_baseurl]

The @copr repo class also accepts a custom Copr instance. Append @ and a url.


Enable the corresponding -source repos of the currently enabled repositories

@base or base or other group

The default repositories for a release specified in a ReleaseConfig's defs.base. Any other repo group specified in a release's configuration is accepted, with or without the @. See SPECIAL REPOS for which repo groups are available for each release.

@repo:[key] or key (fallback)

Accepts any repoid available in the system configuration or a .repo file specified in the current ReleaseConfig's defpaths. If key is the name of a release's repo group (see above), that will be enabled instead.

The following generic repo class macros are available for Fedora releases:


Load the repositories for a tag.
Example: @koji:f39-build-side-XXXX


Load the source repositories for a tag. It does not seem that Fedora Koji provides source repositories for tags other than rawhide and eln-build. For rawhide, see the preconfigured @buildroot repository group.


Name Matcher (--branch) Release repo groups (--repo) Special cases
Fedora Rawhide rawhide @base, @buildroot
Fedora stable and branched fXX @base, @testing, @release, @updates, @testing-only @release only contains fedora and fedora-source (i.e. no updates)
EPEL epelX @base, @testing, @testing-only does not include any EL distribution
EPEL Next epelX-next @base, @testing, @testing-only, @next-base, @next-testing, @next-testing-only @base, @testing, and @testing-only are supersets of the epelX equivalent. @next-base, @next-testing, and @next-testing-only only contain epel-next.
CentOS 7 c7 @base
CentOS Stream cXs @base, @epel, @no-crb, @compose-latest @epel contains epel, epel-next, and crb. @no-crb contains base minus the crb repo.
CentOS Stream 8 (legacy) c8s @base, @epel, @no-powertools, @compose-latest @epel contains epel, epel-next, baseos, appstream, and powertools. @no-powertools contains @base minus the powertools repo.
Almalinux alX @base, @epel, @no-crb @base always includes crb. @epel contains @base along with the EPEL repository. @no-crb contains @base minus the crb repository.
Almalinux 8 (Legacy) al8 @base, @epel, @no-powertools @base always includes powertools. @epel contains @base along with the EPEL repository. @no-powertools contains @base minus the powertools repository.
UBI ubiX @base, @epel, @no-crb
Oracle Linux 8 and 9 ol8 / ol9 @base, @epel, @no-crb, @extra @extra contains the distro_builder and UEK repos
Rocky Linux 8 rl8 @base, @epel, @no-powertools
Rocky Linux 9+ rl9 @base, @epel, @no-crb
Amazon Linux amazon2023 @base
Fedora ELN eln @base, @no-crb, @buildroot
Default local system repositories local N/A This uses the default repositories with enabled=1 in /etc/yum.repos.d and and the system's releasever.
Default local system repositories with a different releasever local:[releasever] N/A This uses the default repositories with enabled=1 in /etc/yum.repos.d and and a custom releasever.



Release repositories enabled by default in the distribution
(e.g. fedora, fedora-source, updates, updates-source for Fedora stable)


Superset of base with -testing repos enabled.
(e.g. fedora, fedora-source, updates, updates-source, updates-testing-source for Fedora stable)


Includes -testing repositories without base
(e.g. updates-testing, updates-testing-source for Fedora stable)

@buildroot (rawhide only)

Koji buildroot repositories Buildroot repositories are available for stable Fedora releases, but they don't have corresponding source repos. This causes problems for fedrq, so those definitions are not available.




Builtin configuration files. These should not be modified directly but may be overridden or used as examples.


System wide configuration files. Has precedence over builtin configuration files.


User configuration files. Highest precedence.

See fedrq(5) for configuration file syntax.



Find a package's runtime dependencies:

$ fedrq pkgs -S -F requires ansible
python(abi) = 3.11
(python3.11dist(ansible-core) >= 2.14.1 with python3.11dist(ansible-core) < 2.15)

Resolve a package's runtime dependencies:

$ fedrq pkgs -S -F requires ansible | fedrq pkgs -iSP

Find the package(s) that contain(s) a file on f35

$ fedrq pkgs -b f35 -P /usr/bin/ansible

Return a JSON object containing certain package attributes:

$ fedrq pkgs scdoc -F json:name,evr,arch,files,requires
    "name": "scdoc",
    "evr": "1.11.2-3.fc37",
    "arch": "x86_64",
    "requires": [
    "files": [
    "name": "scdoc",
    "evr": "1.11.2-3.fc37",
    "arch": "src",
    "requires": [
    "files": [

Show packages' name, evr, arch, and reponame with each package on a single line:

$ fedrq pkgs ansible ansible-core -F line:name,evr,arch,reponame
ansible : 7.2.0-1.fc38 : noarch : rawhide
ansible : 7.2.0-1.fc38 : src : rawhide-source
ansible-core : 2.14.2-1.fc38 : noarch : rawhide
ansible-core : 2.14.2-1.fc38 : src : rawhide-source

Incorrect usage of the line filter:

$ fedrq pkgs ansible ansible-core -F line:name,evr,files
ERROR: 'line' FormatterError: invalid argument 'files'
See fedrq(1) for more information about formatters.

(files cannot fit on a single line)

Find the latest version of `fedrq` available in the gotmax23/fedrq-dev copr:

$ fedrq pkgs -F nevrr -b f36 -r @copr:gotmax23/fedrq-dev fedrq

In a single query, print the Requires of more than one package:

$ fedrq pkgs -F requires ansible-core.src yt-dlp.noarch

In a single query, print the Requires of more than one package, qualified by package name:

$ fedrq pkgs -F multiline:name,requires ansible-core.src yt-dlp.noarch
ansible-core : make
ansible-core : python3-devel
ansible-core : python3dist(packaging)
yt-dlp : /usr/bin/python3
yt-dlp : python3.12dist(requests)
yt-dlp : python3.12dist(urllib3)


Find the packages that require another package, at buildtime or runtime:

$ fedrq whatrequires yt-dlp

Find a package's reverse dependencies, excluding subpackages:

$ fedrq whatrequires -X yt-dlp

Find the packages that require another package, at buildtime or runtime and show which package spec it depends on.

$ fedrq whatrequires -F multiline:plain,rm:ansible-core: ansible-core
ansible-9.2.0-1.fc40.noarch : (python3.12dist(ansible-core) >= 2.16.3 with python3.12dist(ansible-core) < 2.17)
ansible-9.2.0-1.fc40.src : (python3dist(ansible-core) >= 2.16.3 with python3dist(ansible-core) < 2.17)
ansible-bender-0.10.1-5.fc40.noarch : (ansible-core or ansible)
ansible-collection-ansible-netcommon-6.0.0-3.fc40.noarch : (ansible-core or (ansible < 2.10.0 with ansible >= 2.9.10))

Shortcut for the above:

$ fedrq whatrequires -F narm:ansible-core ansible-core
ansible.noarch : (python3.12dist(ansible-core) >= 2.16.3 with python3.12dist(ansible-core) < 2.17)
ansible.src : (python3dist(ansible-core) >= 2.16.3 with python3dist(ansible-core) < 2.17)
ansible-bender.noarch : (ansible-core or ansible)
ansible-collection-ansible-netcommon.noarch : (ansible-core or (ansible < 2.10.0 with ansible >= 2.9.10))


Find an epel9 SRPM's subpackages

$ fedrq subpkgs -b epel9 -F na epel-release

whatrequires-src / wrsrc (alias)

Find the components that would be directly affected by the removal of pcre:

$ fedrq whatrequires-src -X -F source pcre

Find the packages the need to be rebuilt when libindi's .so name is bumped:

$ fedrq whatrequires-src -X -F source libindi


fedrq is maintained by Maxwell G <>. See for more information about fedrq.


fedrq(5), dnf(1)