You can't.
One workaround is to create clone a new environment and then remove the original one.
First, remember to deactivate your current environment. You can do this with the commands:
deactivate
on Windows or
source deactivate
on macOS/Linux.
Then:
conda create --name new_name --clone old_name
conda remove --name old_name --all # or its alias: `conda env remove --name old_name`
Notice there are several drawbacks of this method:
- It redownloads packages (you can use
--offline
flag to disable it)
- Time consumed on copying environment's files
- Temporary double disk usage
There is an open issue requesting this feature.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…