Conda deactivating an environment returns your terminal session to the base environment or system Python, stopping the active environment from affecting your PATH and package resolution. The command works identically on Mac, Linux, and Windows.
The Conda Deactivate Command
conda deactivate
Run this from any active environment to return to base. Run it again from base to exit the Conda environment system entirely. Your terminal prompt changes to reflect the deactivation: (myenv) $ becomes (base) $ becomes $.
Switch Environments Without Explicit Deactivation
conda activate other_environment
Activating a new environment while another is active automatically deactivates the current one first. You only need explicit conda deactivate when you want to return to base without activating another environment.
Frequently Asked Questions
Why is conda deactivate not working?
The most common cause is that conda is not properly initialized in your shell. Run conda init bash (or zsh, fish, etc.) and restart your terminal. If you see “conda: command not found”, conda is not in your PATH — reinstall Miniconda or Anaconda and follow the initialization steps.