LinuxCommandLibrary

urpmq

Query installed or available packages

TLDR

Display information about an installable package

$ urpmq -i [package]
copy

Display direct dependencies of a package
$ urpmq --requires [package]
copy

Display direct and indirect dependencies of a package
$ urpmq [[-d|--requires-recursive]] [package]
copy

List the not installed packages needed for an RPM file with their sources
$ sudo urpmq [[-d|--requires-recursive]] -m --sources [path/to/file.rpm]
copy

List all configured media with their URLs, including inactive media
$ urpmq --list-media --list-url
copy

Search for a package printing [g]roup, version and [r]elease
$ urpmq -g -r [[-y|--fuzzy]] [keyword]
copy

Search for a package with using its exact name
$ urpmq -g -r [package]
copy

SYNOPSIS

urpmq [options] [package_name_or_pattern]

PARAMETERS

-i, --info
    Displays detailed package information (version, size, description).

-l, --list
    Lists all files included in the specified package.

-f <path>, --file <path>
    Identifies the package that owns the given file path.

-p, --provides
    Shows the capabilities (e.g., virtual packages, libraries) provided by a package.

-r, --requires
    Lists the dependencies required by a package.

-R, --reverse-requires
    Shows which packages require the specified package or capability.

-s, --source
    Displays the source package name for a binary package.

-a, --all
    Queries both installed and available packages in repositories.

-y <pattern>, --search <pattern>
    Searches for packages whose name or summary matches the given pattern (regexp).

-w <capability>, --whatprovides <capability>
    Finds packages that provide the specified capability.

-d, --defines
    Shows the RPM internal defines/macros associated with a package.

-q, --query-all
    Queries all available packages, including those not currently installed.

-A, --installed
    Queries only packages currently installed on the system.

-U, --update
    Queries for available updates for installed packages.

-L, --list-media
    Lists all configured urpmi media sources.

-v, --verbose
    Increases output verbosity.

-n, --no-color
    Disables colored output.

-D, --debug
    Enables debug messages.

-e, --exact
    Performs an exact match for package names.

-x, --regexp
    Treats the query pattern as a regular expression.

--fuzzy
    Enables fuzzy matching for searches.

--strict
    Enables strict matching for searches.

--no-deps
    Disables dependency checking/display.

--no-suggests
    Suppresses display of suggested packages during dependency resolution.

--root <dir>
    Specifies an alternate system root directory for querying.

--urpmi-root <dir>
    Specifies an alternate urpmi root directory.

--urpmi-dir <dir>
    Specifies an alternate urpmi configuration directory.

--no-verify-rpmdb
    Skips verification of the RPM database integrity.

--no-refresh
    Prevents urpmi media cache refresh before querying.

--media <media_name>
    Queries packages only from the specified media source.

--list-url <pkg>, --list-uri <pkg>
    Lists download URLs for the specified package.

--urpmi-info
    Displays detailed urpmi configuration information.

--list-packs
    Lists all packages known to urpmi (installed and available).

--list-installed
    Lists all packages installed on the system.

--list-available
    Lists all packages available in configured repositories.

--list-files
    Lists files belonging to the specified packages.

DESCRIPTION

urpmq is a powerful command-line utility primarily used in Mageia and older Mandriva Linux distributions. It serves as the query front-end for the urpmi package management system.

Unlike rpm -q, which queries only the local RPM database, urpmq can query both installed packages and packages available in configured software repositories (media). This allows users to search for packages by name, find which package owns a specific file, list package contents, inspect dependencies (requires and provides), discover source packages, and perform reverse dependency lookups. Its flexibility makes it an essential tool for system administrators and users to manage and understand their software environment.

CAVEATS

urpmq is specific to Mageia Linux and distributions that use urpmi (like older Mandriva versions). It is not available on other RPM-based systems like Fedora or CentOS (which use dnf or yum), nor on Debian-based systems (which use apt). Its utility is therefore limited to its native environment.

USAGE EXAMPLES

Here are some common ways to use urpmq:

• Find a package by name: urpmq firefox
• Get detailed info for a package: urpmq -i kernel
• Search for all packages related to 'mail': urpmq -y mail
• Find which package owns a specific file: urpmq -f /bin/ls
• List contents of a package: urpmq -l coreutils
• See what provides a specific capability: urpmq -w perl(HTTP::Daemon)

HISTORY

urpmq emerged as part of the urpmi suite, which was developed for Mandrake Linux (later Mandriva Linux) as an advanced package management frontend built on top of RPM. Its creation aimed to simplify dependency resolution and package installation, akin to apt on Debian, by integrating repository management. urpmq specifically provided the query capabilities that went beyond the basic rpm -q by interacting with the configured repositories. It continues to be actively maintained and used in Mageia Linux, a fork of Mandriva.

SEE ALSO

urpmi(8), rpm(8), urpmf(1), urpme(8)

Copied to clipboard