Reputation: 70314
The documentation for conda env update
does not really answer this question: After executing the command, is the environment now the same as described in the -f FILE
yaml file or does it just add non-existent packages and upgrade outdated packages, leaving manually installed packages?
Upvotes: 6
Views: 4296
Reputation: 4818
The --prune
option of conda env update
is what you are looking for:
conda env update -f file.yml --prune
The option is mentioned in the documentation
Edit: As @MarkLoyman mentions, it had issues since conda 4.4 (GitHub issue), but has been fixed since conda 23.9.0 (GitHub pull request).
Upvotes: 7