mamba-repoquery
Search package information within a mamba repository
TLDR
Search for all available versions of a particular package
Search for all packages satisfying specific constraints
List the dependencies of a package installed in the currently activated environment, in a tree format
Print packages in the current environment that require a particular package to be installed (i.e. inverse of depends)
SYNOPSIS
mamba repoquery <subcommand> [OPTIONS] [PACKAGE_SPEC]...
PARAMETERS
depends <PACKAGE_SPEC>
Displays the forward dependencies of a specified package. Common options like --tree (for a hierarchical view) and --recursive (to list all nested dependencies) can be used with this subcommand.
whatrequires <PACKAGE_SPEC>
Shows which packages depend on the specified package (reverse dependencies). Can be used with --recursive for a comprehensive list.
search <QUERY>
Searches the configured repositories for packages matching the given query string. Options include --match-exact for precise matching.
info <PACKAGE_SPEC>
Provides detailed metadata for a specific package, such as its version, build string, channel, dependencies, and file list.
--channel <CHANNEL_URL>
Specifies additional channels to search for packages. This option can be provided multiple times to include multiple channels.
--platform <PLATFORM>
Queries package information for a specific platform, e.g., linux-64, osx-arm64, win-64.
--json
Outputs the command's result in JSON format, facilitating programmatic parsing and integration with other tools.
--tree
(Used primarily with depends) Displays dependencies in a hierarchical, tree-like structure, making complex dependency graphs easier to visualize.
--recursive
(Used with depends, whatrequires) Lists all dependencies or reverse dependencies recursively down the graph, providing a complete picture.
--match-exact
(Used with search) Ensures the search query matches package names exactly, useful for precise package lookups.
DESCRIPTION
mamba-repoquery is a powerful subcommand of the mamba package manager, designed for efficiently querying package information from configured conda and mamba repositories. It allows users to inspect package metadata, resolve dependencies, find reverse dependencies (what requires a package), and search for packages across various channels without necessarily installing them.
This tool is invaluable for understanding the dependency graph of an environment, troubleshooting dependency conflicts, or simply exploring available software. It offers various sub-commands and options to drill down into specific details, such as package versions, build strings, channels, and full dependency trees, making it a crucial utility for developers and system administrators working with conda-based environments.
CAVEATS
Requires mamba to be installed and accessible in the system's PATH.
Relies on correctly configured channels in the user's .condarc file or explicitly provided via the --channel option.
Network connectivity is essential to query remote repositories and retrieve current package metadata.
Performance can vary based on the number and size of channels indexed, although mamba is generally very fast.
PERFORMANCE
mamba-repoquery is renowned for its speed, often outperforming conda's equivalent operations due to mamba's highly optimized C++ backend and efficient solver. This is a primary reason for its adoption in environments with large numbers of packages or complex dependency graphs.
INTEGRATION WITH CONDA ENVIRONMENTS
While mamba-repoquery is a mamba subcommand, it operates seamlessly on the same conda environment and channel configurations. This ensures full compatibility with existing conda setups, allowing users to leverage mamba's speed without altering their established workflows.
HISTORY
mamba was created to provide a faster, more robust alternative to conda for dependency resolution and package management, leveraging a C++ backend for superior performance. mamba-repoquery emerged as an integral part of this effort, offering a significantly faster way to query conda-compatible repositories compared to traditional conda commands. Its development is deeply intertwined with the overarching mamba project's goal of accelerating and enhancing package management operations in scientific computing and data science environments.
SEE ALSO
conda(1), mamba(1), dnf-repoquery(8), yum-repoquery(8)