conda-repoquery
Query Conda package repository information
TLDR
Show available versions of the specified package
Show dependencies of the specified package
Show packages that depend on the specified package
SYNOPSIS
conda repoquery [OPTIONS] [QUERY]
PARAMETERS
-h, --help
Show this help message and exit
--json
Report results in JSON format
--table
Report results in human-readable table format (default)
--repodata-ref <REPDATA_REF>
Use repodata from specific git ref (default: current)
--repodata <REPDATA>
Full path to repodata.json or repodata.json.bz2
--index <INDEX>
Full path to channel index tar.bz2 file
-c <CHANNEL>, --channel <CHANNEL>
Channel URL (file:// path or https:// URL). Multiple channels allowed
--override-channels
Do not use conda configuration channels
--platform <PLATFORM>
Filter by platform (e.g., linux-64, osx-arm64)
--json-api
Return structured JSON for machine consumption (includes extra metadata)
DESCRIPTION
conda repoquery is a powerful command-line tool introduced in modern Conda versions to inspect and query package information directly from Conda channels and repositories. It provides detailed metadata about available packages, including versions, builds, dependencies, and file lists, without requiring installation. This makes it invaluable for dependency analysis, version checking, and scripting package management workflows.
Unlike the older conda search, which is deprecated, conda repoquery leverages the faster libmamba solver backend for efficient querying. Users can filter by package name, matchspecs (e.g., 'numpy=1.21*'), platform, or channel. Output formats include human-readable tables or structured JSON, ideal for automation.
Key use cases include verifying package availability across channels, resolving dependency conflicts pre-install, extracting file lists from remote packages, and integrating with CI/CD pipelines. It supports local repodata files for offline use, enhancing reproducibility in air-gapped environments. By default, it queries configured channels but allows overrides for precise control.
CAVEATS
Requires internet access by default unless --repodata or --index specified. May be slower on very large channels. JSON output structure subject to change. Not all metadata available remotely without downloading package.
EXAMPLES
conda repoquery numpy <br>conda repoquery 'numpy >=1.24' --json <br>conda repoquery -c conda-forge --platform linux-64 pytorch
QUERY FORMAT
Supports Conda matchspecs: name, name=version, name[build], channel::name, etc.
HISTORY
Introduced in Conda 23.7.0 (July 2023) as part of prefixdev/conda refactor to improve performance over conda search. Developed alongside libmamba solver integration for faster repo metadata handling. Actively maintained for reproducibility and scripting needs.
SEE ALSO
conda(1), mamba repoquery(1)


