How can I rename a conda environment?
I have a conda environment named
old_name, how can I change its name to
new_name without breaking references?
(remember about deactivating current environment with
deactivate on Windows and
source deactivate on macOS/Linux)
conda create --name new_name --clone old_name conda remove --name old_name --all # or its alias: `conda env remove --name old_name`
There are several drawbacks of this method:
- it redownloads packages - you can use
--offlineflag to disable it,
- time consumed on copying environment's files,
- temporary double disk usage.
There is an open issue requesting this feature.
★ Back to homepage or read more recommendations: