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
Anyone who spends serious time juggling Python projects knows the drill: before you know it, you’ve spun up half a dozen Conda environments and lost track of what’s where. Taking a quick second to check what you have, where it actually lives on your drive, and which one you're currently standing in saves a ton of headache - especially those maddening moments where you swore you installed a library ten minutes ago. Here is a straightforward walkthrough on how to check your environments, from the go-to default command to a few handy flags for monitoring disk space and packages.
Why Check Your Conda Environments?
Conda environments are lifesavers for keeping messy project dependencies from clobbering each other. Running conda env list basically gives you the lay of the land so you aren't guessing. It lets you double-check that you're in the right workspace before firing off a script, spot ancient environments eating up gigabytes of drive space, grab the exact interpreter path when you’re setting up VS Code or PyCharm, and easily jump between different setups.
Getting that visibility makes maintaining your system way less of a chore. If you happen to spot some old projects you haven't touched in a year, you can check out this guide on removing Conda environments to walk through deleting them safely without breaking anything.
The Commands to See Everything
You actually have two ways to pull up the exact same list, depending on which one your fingers type first:
Bash
conda env listor:
Bash
conda info --envsThey do the exact same thing behind the scenes. The conda info --envs syntax is just the older style that’s been around forever, which is why you'll still see folks use both interchangeably across blogs and Stack Overflow threads.
Here is what that looks like in practice:
# 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_envThe
baseenvironment is your default root setup from your initial Anaconda or Miniconda install.Any custom environments you've built, like
data_science_env, show up beneath it alongside their full file paths.That little asterisk (
*) simply tells you which environment your terminal is currently using.
Handy Flags: --json and --size
While the plain output gets the job done 90% of the time, Conda packs a couple of extra flags that come in clutch for specific tasks.
If you're scripting or automating setup routines, the JSON flag formats everything cleanly:
Bash
conda env list --jsonThis dumps your environment paths into pure JSON, making it super easy to parse in Python or slice up using tools like jq:
JSON
{
"envs": [
"/home/user/anaconda3",
"/home/user/anaconda3/envs/data_science_env",
"/home/user/anaconda3/envs/web_dev_env"
]
}If you're running low on drive space, checking disk usage will help you spot the biggest culprits:
Bash
conda env list --sizeThis appends a neat size breakdown next to each environment so you know where your storage went. Just keep in mind that this calculation only tallies up packages Conda installed itself; any manual files, cache folders, or data you dropped into that directory later won't be counted here.
Checking What’s Installed Inside an Environment
Listing your environments shows you the neighborhood, but what if you need to inspect what's inside the house? You can use conda list combined with the -n flag to peek into any specific environment without leaving your current terminal:
Bash
conda list -n data_science_envIf you just want an inventory of whatever environment you are actively standing in right now, keep it simple:
Bash
conda listYou can even dump an exact snapshot of those packages straight to a text file, which is a lifesaver when you need to recreate the same setup on another machine or share it with a coworker:
Bash
conda list -n data_science_env --explicit > environment.txtThis pairs naturally with how you configure your overall app settings. If your code also leans on specific runtime configurations or secrets alongside these libraries, take a look at how to set and use environment variables in Python to keep the whole workspace clean and decoupled.
Switching Environments After You Find What You Need
Once you've spotted the environment you want to work in, switching over is just a single command:
Bash
conda activate data_science_envWhenever you want to hop back over to your root setup:
Bash
conda activate baseAnd if you want to step out of Conda entirely and return your shell to the plain system default:
Bash
conda deactivateA good habit after activating is to run conda env list one more time just to verify the asterisk (*) jumped over to where you expect it to be.
Common Headaches and Quick Fixes
"conda: command not found": This almost always means Conda isn't recognized by your shell because it hasn't been added to your PATH environment variable. You can fix this by running conda init in your shell, manually exporting the binary directory path in your profile (.bashrc or .zshrc), or running the installer again.
You only see base in the list: Don't worry - that just means you haven't built any custom isolated environments yet. You can kick off your first project space by running:
Bash
conda create --name my_env python=3.11An environment you created is missing: If you used the --prefix flag to build an environment directly inside a custom folder rather than letting Conda tuck it away in its default directory, Conda won't track it on this list. You'll just need to activate it using its explicit directory path instead:
Bash
conda activate /path/to/my_envPermission denied warnings: If you’re working on a shared server or a school lab machine, you might stumble across environments owned by other users that you aren't permitted to read. You'll need to reach out to whoever administers the system to sort out group read permissions.
Once you have your full list laid out, spotting dormant or duplicate projects becomes second nature. Wiping out the ones you don't need anymore with conda remove --name env_name --all helps keep your drive uncluttered, and the conda environment removal walkthrough breaks down all the options, including the trickier edge cases like wiping custom prefix folders cleanly.
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.