LinuxCommandLibrary

conda-list

List installed Conda packages

TLDR

List all packages in the current environment

$ conda list
copy

List packages in the named environment
$ conda list [[-n|--name]] [environment]
copy

List packages installed in a given path
$ conda list [[-p|--prefix]] [path/to/environment]
copy

Filter installed packages using regex
$ conda list [regex]
copy

Save packages for future use
$ conda list [[-e|--export]] > [path/to/package-list.txt]
copy

SYNOPSIS

conda list [options] [regex_pattern]

PARAMETERS

--explicit
    List packages with full URLs for use in conda create --file.

--export [CHANNEL_URL]
    Export environment as shareable YAML spec.

--revisions
    Display history of environment revisions.

--json
    Output list in machine-readable JSON format.

-n NAME, --name NAME
    Target environment by name.

-p PREFIX, --prefix PREFIX
    Target environment by full filesystem path.

--reverse, -r
    Sort from newest to oldest installed.

--show-channel-urls, -s
    Include full channel URLs in output.

--quiet, -q
    Suppress non-essential output.

--help, -h
    Show command help.

DESCRIPTION

conda list is a core command in the Conda package manager, used to display all packages installed in the currently active environment or a specified one. Each entry shows the package name, version, build string, and source channel. It helps users inspect dependencies, verify installations, and debug issues. By default, packages are listed in installation order from oldest to newest, but options allow sorting, filtering, and alternative formats like JSON or exportable YAML. A regex pattern can filter results to specific packages. This command is vital for reproducible science, enabling environment sharing via exports. It integrates with Anaconda/Miniconda ecosystems, supporting Python, R, and other languages. Output includes build details for precise recreation. Use with --name or --prefix to target non-active environments without switching.

CAVEATS

Requires active conda environment; output varies by conda version. Regex pattern is case-sensitive. Does not list unpinned packages distinctly without options.

EXAMPLES

conda list # All packages
conda list numpy # Filter numpy
conda list --export > environment.yml # Export spec

OUTPUT COLUMNS

Name | Version | Build | Channel
e.g., numpy 1.21.0 py39hblah_0 conda-forge

HISTORY

Developed as part of Conda (2012) by Anaconda Inc. for managing complex dependencies. Gained --export and --revisions in Conda 4.4+ (2017); JSON support in later 4.x releases. Widely used in data science for reproducible workflows.

SEE ALSO

conda info, conda search, pip list

Copied to clipboard