Conda commands — All in one
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 environmentconda activate
- Activate a specific conda environmentconda deactivate
- Deactivate the current conda environmentconda list
- List all packages in the current conda environmentconda install
- Install a package in the current conda environmentconda update
- Update a package in the current conda environmentconda remove
- Remove a package from the current conda environmentconda info
- Display information about the current conda environmentconda search
- Search for a package in the conda repositoriesconda env export
- Export the current conda environment to a fileconda env create
- Create a new conda environment from a file
advanced conda commands
conda config
- Modify configuration settings for condaconda init
- Initialize conda in the shellconda clean
- Clean up conda packages and cachesconda info --envs
- List all conda environments on your systemconda list --revisions
- List all package revisions installed in the current environmentconda create --name myenv --clone base
- Create a new environment named "myenv" that is identical to the base environmentconda update --all
- Update all packages in the current environmentconda install --file requirements.txt
- Install packages listed in a specified text fileconda env export --no-builds
- Export the current environment, but exclude build informationconda env remove --name myenv
- Remove an environment named "myenv"conda index --update-cache
- Update the local package cacheconda create --name myenv --file spec-file.txt
- Create a new environment named "myenv" and install packages listed in a specified text fileconda create --name myenv --strict-channel-priority
- Create a new environment named "myenv" with strict channel priorityconda install --name myenv --channel conda-forge package-name
- Install a package from a specific channel in a named environmentconda install --name myenv --use-index-cache
- Install packages using the index cache, rather than downloading from the internetconda list --json
- Output the package list in json formatconda info --json
- Output information about the current environment in json formatconda update --all --force-reinstall
- Force the reinstallation of all packages in the current environmentconda clean --dry-run
- Perform a dry run of the clean command without removing any filesconda config --add channels conda-forge
- Add a new channel to the list of channelsconda env export --from-history
- Export the environment of the last command executed