Deactivating a Conda environment returns your terminal session to the base environment or system Python, stopping the isolated environment from affecting your shell. The command is the same across Mac, Linux, and Windows:

conda deactivate

When to Deactivate a Conda Environment

Deactivate when you finish working on a project and want to switch to a different environment or return to base Python. Deactivate when a tool you need to run is not compatible with the active environment. Deactivate before running system-level commands that should not be affected by environment-specific Python installations.

Switch Between Environments Without Deactivating

You do not need to explicitly deactivate before activating a different environment. Running conda activate newenv while another environment is active automatically deactivates the current one and activates the new one in a single step.

Frequently Asked Questions

How do I know which Conda environment is currently active?

The active environment name appears in parentheses before your terminal prompt: (myenv) user@machine $. Run conda env list to see all environments, with an asterisk (*) next to the active one. Run conda info for detailed information including the active environment path.