Commands to manage your base environment safely.
Manage your conda 'base' environment safely.
$ conda self
usage: conda self [-V] [-h] {install,remove,reset,update} ...
Manage your conda 'base' environment safely.
options:
-V, --version Show the 'conda-self' version number and exit.
-h, --help Show this help message and exit.
subcommands:
{install,remove,reset,update}
install Add conda plugins to the 'base' environment.
remove Remove conda plugins from the 'base' environment.
reset Reset 'base' environment to essential packages only.
update Update 'conda' and/or its plugins in the 'base' environment.
conda self install and conda self update use your configured channels.
To install plugins from a custom channel (e.g. a company or community channel
on anaconda.org or prefix.dev), add it to your configuration first:
conda config --add channels my-channel -n base
conda self install my-plugin
This keeps channel configuration consistent across install, update, and dependency resolution.
Inline channel specs (e.g. conda-forge::my-plugin) are not supported and
will result in an error.
To check if your base environment is protected, run:
conda doctor base-protection
To protect your base environment, run:
conda doctor base-protection --fix
This will:
- Clone your current base environment to a new "default" environment
- Reset base to essential packages only
- Freeze the base environment to prevent modifications
To see all available health checks, run:
conda doctor --list
To remove protection entirely, delete the frozen file:
rm $CONDA_PREFIX/conda-meta/frozen
To bypass protection for a single command, pass --override-frozen or set
CONDA_OVERRIDE_FROZEN=1. To disable it permanently, add override_frozen: true
to your .condarc.
By default, conda self reset keeps only conda, conda-self, and their
plugins installed. To keep additional packages (and their dependencies) in
the base environment, add them to the self_permanent_packages setting in
your .condarc:
plugins:
self_permanent_packages:
- anaconda-anon-usageOr use conda config:
conda config --add plugins.self_permanent_packages anaconda-anon-usageconda install -n base conda-selfconda self --help
See CONTRIBUTING.md