Conda commands — All in one

AI Maverick
2 min readJan 25, 2023

--

In this article, I collected all of the conda’s commands from basic to advance;

Basic commands

  • conda create - Create a new conda environment
  • conda activate - Activate a specific conda environment
  • conda deactivate - Deactivate the current conda environment
  • conda list - List all packages in the current conda environment
  • conda install - Install a package in the current conda environment
  • conda update - Update a package in the current conda environment
  • conda remove - Remove a package from the current conda environment
  • conda info - Display information about the current conda environment
  • conda search - Search for a package in the conda repositories
  • conda env export - Export the current conda environment to a file
  • conda env create - Create a new conda environment from a file

advanced conda commands

  • conda config - Modify configuration settings for conda
  • conda init - Initialize conda in the shell
  • conda clean - Clean up conda packages and caches
  • conda info --envs - List all conda environments on your system
  • conda list --revisions - List all package revisions installed in the current environment
  • conda create --name myenv --clone base - Create a new environment named "myenv" that is identical to the base environment
  • conda update --all - Update all packages in the current environment
  • conda install --file requirements.txt - Install packages listed in a specified text file
  • conda env export --no-builds - Export the current environment, but exclude build information
  • conda env remove --name myenv - Remove an environment named "myenv"
  • conda index --update-cache - Update the local package cache
  • conda create --name myenv --file spec-file.txt - Create a new environment named "myenv" and install packages listed in a specified text file
  • conda create --name myenv --strict-channel-priority - Create a new environment named "myenv" with strict channel priority
  • conda install --name myenv --channel conda-forge package-name - Install a package from a specific channel in a named environment
  • conda install --name myenv --use-index-cache - Install packages using the index cache, rather than downloading from the internet
  • conda list --json - Output the package list in json format
  • conda info --json - Output information about the current environment in json format
  • conda update --all --force-reinstall - Force the reinstallation of all packages in the current environment
  • conda clean --dry-run - Perform a dry run of the clean command without removing any files
  • conda config --add channels conda-forge - Add a new channel to the list of channels
  • conda env export --from-history - Export the environment of the last command executed

--

--