Before changing a Conda environment, checking its installed packages prevents work from targeting the wrong Python stack or missing a dependency that is already present. Anaconda installations can have several named environments, so tie the package list to an environment name or prefix instead of relying on whatever shell happens to be active.
conda list prints package names, versions, build strings, and channels for the selected environment. Running it with --name keeps the check read-only and explicit, while running it without a target lists the environment currently active in the terminal.
A full inventory helps with audits and handoffs, but package-specific checks are better for one dependency. The filter argument is a regular expression, so use --full-name when a row must match one exact package name.
Steps to list packages in an Anaconda environment:
- Open a terminal where Conda is available.
- List the available environments and choose the target environment.
$ conda info --envs # conda environments: # # * -> active # + -> frozen base /opt/conda
Replace base in the following examples with the environment name you need, or use --prefix with a full environment path.
Related: How to list Anaconda environments - List all packages in the target environment.
$ conda list --name base # packages in environment at /opt/conda: # # Name Version Build Channel _libgcc_mutex 0.1 main _openmp_mutex 5.1 51_gnu anaconda-anon-usage 0.7.6 pyhb46e38b_100 ##### snipped ##### python 3.13.13 h0f2f12d_100_cp313 ##### snipped ##### zstd 1.5.7 hc8aa508_0
Run conda list without --name only when the correct environment is already active.
- Filter the list to package names matching a search term.
$ conda list --name base python # packages in environment at /opt/conda: # # Name Version Build Channel msgpack-python 1.1.1 py313h419075a_0 python 3.13.13 h0f2f12d_100_cp313 python-dotenv 1.2.1 py313hd43f75c_0 python_abi 3.13 3_cp313
The package filter is a regular expression, so related package names can appear with the package you had in mind.
- Match one exact package name when the check needs a single row.
$ conda list --name base --full-name python # packages in environment at /opt/conda: # # Name Version Build Channel python 3.13.13 h0f2f12d_100_cp313
- Show the source channel for an exact package match.
$ conda list --name base --show-channel-urls --full-name python # packages in environment at /opt/conda: # # Name Version Build Channel python 3.13.13 h0f2f12d_100_cp313 defaults
- Print JSON when another tool needs to parse the package list.
$ conda list --name base --json python [ { "base_url": "https://repo.anaconda.com/pkgs/main", "build_number": 0, "build_string": "py313h419075a_0", "channel": "pkgs/main", "dist_name": "msgpack-python-1.1.1-py313h419075a_0", "name": "msgpack-python", "platform": "linux-aarch64", "version": "1.1.1" }, { "base_url": "https://repo.anaconda.com/pkgs/main", "build_number": 100, "build_string": "h0f2f12d_100_cp313", "channel": "pkgs/main", "dist_name": "python-3.13.13-h0f2f12d_100_cp313", "name": "python", "platform": "linux-aarch64", "version": "3.13.13" }, { "base_url": "https://repo.anaconda.com/pkgs/main", "build_number": 0, "build_string": "py313hd43f75c_0", "channel": "pkgs/main", "dist_name": "python-dotenv-1.2.1-py313hd43f75c_0", "name": "python-dotenv", "platform": "linux-aarch64", "version": "1.2.1" }, { "base_url": "https://repo.anaconda.com/pkgs/main", "build_number": 3, "build_string": "3_cp313", "channel": "pkgs/main", "dist_name": "python_abi-3.13-3_cp313", "name": "python_abi", "platform": "linux-aarch64", "version": "3.13" } ]
Mohd Shakir Zakaria is a cloud architect with deep roots in software development and open-source advocacy. Certified in AWS, Red Hat, VMware, ITIL, and Linux, he specializes in designing and managing robust cloud and on-premises infrastructures.