fedrq - Man Page

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 is a tool to simplify querying the Fedora and EPEL repositories.


check-configVerify fedrq configuration. Only has --debug and --dump to dump the config. --dump requires tomli-w.
pkgsFind the packages that match a list of package specs. Allows --whatprovides like functionality with --resolve-packages.
subpkgsFind the subpackages provided by a list of SRPMs. Doesn't have --src, because subpkgs aren't SRPMs.
whatenhancesFind the packages that Enhance [package...]
whatrecommendsFind the packages that Recommend [package...]
whatrequiresFind the packages that Require [package...]
wrAlias for whatrequires
whatrequires-srcFind the packages Require the subpackages of [package...]. [package...] must be source package(s).
wrsrcAlias for whatrequires-src
whatsuggestsFind the packages that Suggest [package...]
whatsupplementsFind the packages that Supplement [package...]


Global Options

-h,  --help

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

Shared Options

These options have the same meaning across multiple subcommands.

-i,  --stdin

Read package names from stdin. Cannot be used when passing postional [packages...].

-b,  --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 releasever will be set to and which repositories will be enabled by default.

-r,  --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 in a ReleaseConfig's defpaths (see fedrq(5)). In addition, release specifc 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,  --enablerepo <repo class>

Enable certain repositories for this operation. All repositories in the system configuration and any fedrq repo classes are accepted. Can be specified multiple times. Accepts comma separated values. See Repo Classes.

-l,  --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,  --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 <str>

Query a foreign architecture's repositories

-B,  --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,  --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, which doesn't load filelists by default to save memory and bandwidth. dnf4 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, --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.


Package attributes (nonexhaustive; see dnf repoquery --querytags):

  • -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)

Custom 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.
  • -F json:[comma seperated 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 seperated list of Package attrs]: Return the specified package attributes on a single line.
  • -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.

Repo Classes

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 https://copr.fedoraproject.org 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 repoistories for a release specified in a ReleaseConfig's defs.base. Any other repo group specified in a release's 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 specific 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 koji.fedoraproject.org tag.
Example: @koji:f39-build-side-XXXX


Load the source repositories for a koji.fedoraproject.org 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.

Builtin Releases

NameMatcher (--branch)Release repo groups (--repo)Special cases
Fedora Rawhiderawhide@base, @buildroot
Fedora stable and branchedfXX@base, @testing, @release, @updates, @testing-only@release only contains fedora and fedora-source (i.e. no updates)
EPELepelX@base, @testing, @testing-onlydoes not include any EL distribution
EPEL NextepelX-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 7c7@base
CentOS StreamcXs@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.
AlmalinuxalX@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.
UBIubiX@base, @epel, @no-crb
Oracle Linux 8 and 9ol8 / ol9@base, @epel, @no-crb, @extra@extra contains the distro_builder and UEK repos
Rocky Linux 8rl8@base, @epel, @no-powertools
Rocky Linux 9+; local should always be last in the above table

rl9@base, @epel, @no-crb
Amazon Linuxamazon2023@base
Fedora ELNeln@base, no-crb
Default local system repositorieslocalN/AThis 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 releaseverlocal:[releasever]N/AThis uses the default repositories with enabled=1 in /etc/yum.repos.d and and a custom releasever.

Special Repos


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.



PYTHON_SITELIB/fedrq/data/*.toml Builtin configuration files. These should not be modified directly but may be overridden or used as examples.

/etc/fedrq/*.toml System wide configuration files. Has precedence over builtin configuration files.

~/.config/fedrq/*.toml 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
  fedrq-0.4.1^25.20230318.76d7910-1.fc36.noarch copr:copr.fedorainfracloud.org:gotmax23:fedrq-dev
  fedrq-0.4.1^25.20230318.76d7910-1.fc36.src copr:copr.fedorainfracloud.org:gotmax23:fedrq-dev


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 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 <maxwell@gtmx.me>. See https://fedrq.gtmx.me/ for more information about fedrq.

See Also

fedrq(5), dnf(1)

Referenced By