List Conda environments with conda env list or conda info --envs; the active environment is marked with an asterisk. Add --json when another tool needs machine-readable output, use the printed path to inspect or remove a specific environment, and activate the correct name before installing packages so they do not land in the wrong project.
How to List Conda Environments Easily
Learn how to list all Conda environments using conda env list and conda info --envs. Includes flags for JSON output, disk usage, and package listing.
// The short answer
In this guide · 6 sections
If you work on multiple Python projects, you've probably created several Conda environments over time. Knowing which environments exist, where they are stored, and which one is currently active saves you time and prevents "why isn't my package installed?" moments. This guide covers every way to list Conda environments, from the basic command to useful flags for checking disk usage and package details.
Why List Conda Environments?
Conda environments keep your project dependencies isolated. When you run conda env list, you get a clear picture of all your setups so you can confirm which environment is active before running a script, identify old or unused environments to delete and free up disk space, find the exact path to an environment when configuring IDEs like VS Code or PyCharm, and quickly switch to the right environment for a given project.
Once you know what's there, managing your environments becomes much easier. If you need to clean up old ones, the guide on removing Conda environments walks through safe deletion step by step.
Commands to List All Conda Environments
There are two equivalent commands that display all your Conda environments:
conda env listor:
conda info --envsBoth produce the same output. The conda info --envs form is slightly older but still widely used, so you'll see both in tutorials and documentation.
Example output:
# conda environments:
#
base * /home/user/anaconda3
data_science_env /home/user/anaconda3/envs/data_science_env
web_dev_env /home/user/anaconda3/envs/web_dev_env- The
baseenvironment is created automatically when you install Conda. - Custom environments like
data_science_envappear below it with their full paths. - The asterisk (
*) marks the currently active environment.
Useful Flags: --json and --size
The basic command works well for most cases, but Conda provides extra flags when you need more information.
JSON output is useful for scripts or automation:
conda env list --jsonThis outputs the environment list in JSON format, which you can pipe into tools like jq or parse with Python:
{
"envs": [
"/home/user/anaconda3",
"/home/user/anaconda3/envs/data_science_env",
"/home/user/anaconda3/envs/web_dev_env"
]
}Disk usage per environment is helpful for identifying large environments:
conda env list --sizeThis adds a size column showing how much disk space each environment uses. Note that it only counts packages managed by Conda; files added manually after installation are not included.
List Packages Inside a Specific Environment
Listing your environments shows you which environments exist, but sometimes you need to see what's installed inside one. Use conda list with the -n flag and the environment name:
conda list -n data_science_envIf you want to check the environment you're currently in, just run:
conda listYou can also export the package list to a file, which is great for reproducing an environment on another machine:
conda list -n data_science_env --explicit > environment.txtThis ties directly into managing Python dependencies. If your project relies on specific environment variables alongside its packages, see how to set and use environment variables in Python for a clean project setup.
Activate an Environment After Listing
Once you've confirmed which environment you need, activate it with:
conda activate data_science_envTo switch back to the base environment:
conda activate baseAnd to deactivate the current environment entirely, returning to the system default:
conda deactivateAfter activation, run conda env list again to confirm the asterisk has moved to your newly activated environment.
Common Errors and How to Fix Them
Command not found: If your terminal says conda: command not found, Conda is either not installed or not on your system's PATH. Reinstall Anaconda or Miniconda, or add the Conda binary directory to your PATH manually.
Empty environment list: If only base appears, you haven't created additional environments yet. Create one with:
conda create --name my_env python=3.11Environment not showing up: If you created an environment outside the default Conda directory using --prefix, it won't appear in the list automatically. Use the full path to activate it:
conda activate /path/to/my_envPermission issues: On shared systems or servers, you may not have read access to environments created by other users. Contact your system administrator if you need access to those environments.
Once you have the full list in front of you, spotting outdated or unused environments is easy. Removing them with conda remove --name env_name --all keeps your setup clean, and the conda environment removal page covers all the options, including how to handle environments created with a custom --prefix.
Quick answers
Frequently asked questions
What is the difference between conda env list and conda info --envs?
There is no functional difference. Both commands list all Conda environments on your system along with their file paths. conda env list is the more commonly used form in modern documentation, while conda info --envs is an older alias that does the same thing.
How do I list packages in a specific Conda environment without activating it?
Use the -n flag followed by the environment name: conda list -n my_env. This shows all packages installed in that environment without requiring you to activate it first.
Why does my Conda environment not show up in the list?
If you created the environment with a custom --prefix path outside the default Conda directory, it won't appear in conda env list. You can still activate it by providing its full path: conda activate /path/to/env.
How can I see the disk size of each Conda environment?
Run conda env list --size. This adds a size column to the output showing disk usage for each environment. The measurement covers only Conda-managed packages and excludes files added manually after installation.
How do I delete a Conda environment I found in the list?
Use conda remove --name my_env --all to completely remove an environment and all its packages. Make sure to deactivate it first if it is currently active.
Something wrong or out of date?
Tools change fast. Tell the editor what no longer works.