Updating conda packages
Using conda update
Use the conda update
command to install the latest version of a package that remains compatible with the other packages in your environment.
Run conda update --help
to see a list of available options.
Updating a single package
To update a single package, run the following command:
When you update a package, conda might also update other packages in the environment to maintain compatibility, or install new packages required by updated dependencies. This helps prevent your environment from breaking due to dependency changes. To prevent conda from updating any packages other than the one you specify, use the --no-update-deps
flag.
The --no-update-deps
flag only prevents conda from updating other packages in the environment. It does not prevent conda from installing new packages required by updated dependencies.
Updating multiple packages
To update multiple packages, list the packages separated by a space:
Updating a package to a specific version
If you need to update a package to a specific version, use the conda install command instead.
Specifying a channel for package updates
Specifying a channel to use when updating a package is useful if the package you want to update is only available (or is more up to date) in a specific channel. Use the --override-channels
flag to ignore the channels configured in your environment and .condarc
file, and the --channel
flag to provide the channel you want to use.
Updating all packages
Running conda update --all
might not update all the packages in a given environment to their latest versions. If the latest version of a package is incompatible with other packages installed in the environment, conda will only update that package to the latest compatible version.
For more information on updating packages, see the official conda documentation.