LinuxCommandLibrary

conda-update

Update conda packages

TLDR

Update all packages in the current environment

$ conda update [[--all|--update-all]]
copy

Update a specific package in the current environment
$ conda update [package_name]
copy

Update conda itself in the base environment
$ conda update [[-n|--name]] base conda
copy

Update packages while ignoring pinned packages
$ conda update --no-pin
copy

Update packages in offline mode
$ conda update --offline
copy

SYNOPSIS

conda update [options] [package_spec ...]

Common usage patterns:
conda update package_name
conda update --all
conda update -n environment_name --all
conda update conda

PARAMETERS

-n ENV, --name ENV
    Specify the name of the environment to update instead of the current active environment.

-c CHANNEL, --channel CHANNEL
    Specify the channel from which to search for packages. Use multiple times for multiple channels. Channel order matters.

--all
    Update all packages in the current environment to their latest compatible versions.

--override-channels
    Do not search default channels or channels specified in .condarc. Only use channels passed via -c.

--strict-channel-priority
    Enforce strict channel priority. Packages from lower priority channels are only considered if a package cannot be found in a higher priority channel.

--dry-run
    Only display what would have been done without actually performing the update.

--yes
    Do not ask for confirmation before performing the update operation.

--force-reinstall
    Reinstall all packages, even if they appear to be already installed and up-to-date.

--no-deps
    Do not update dependencies; only update the specified packages.

--update-deps
    Update dependencies where applicable. This is the default behavior when updating specified packages.

--prune
    Remove packages that are no longer needed or explicitly installed as dependencies but now have no dependent packages.

--json
    Report all output as JSON. Useful for programmatic parsing.

-q, --quiet
    Do not display progress indicators or other informational messages.

DESCRIPTION

The conda update command is a core utility within the Conda package, dependency, and environment management system. While often referred to conceptually as "conda-update," the command is typically invoked as conda update (without a hyphen). It is used to update one or more specified packages to the latest available version that is consistent with other packages in the environment. If no specific packages are named, conda update will attempt to update all packages in the current environment to their latest compatible versions.

This command is also vital for updating the Conda package manager itself (e.g., conda update conda) or for performing comprehensive updates on a specific named environment (e.g., conda update -n myenv --all). It intelligently resolves dependencies to ensure that all updated packages remain compatible within the environment, thereby preventing conflicts and maintaining a stable operational state. It is an indispensable tool for keeping Conda installations and their managed environments up-to-date and functional.

CAVEATS

Using conda update --all can sometimes lead to an environment that is not fully resolvable or might unintentionally downgrade certain packages if channel priorities are not observed. Always consider using it with --dry-run first. It's highly recommended to update Conda itself using conda update conda before updating other packages or environments, as newer Conda versions often contain critical bug fixes and performance improvements. Be mindful of channel order and `strict_channel_priority` settings, as they dictate how packages are resolved and installed.

UPDATING CONDA ITSELF

To update the Conda package manager itself to the latest version, use the command: conda update conda. This is a crucial first step and is often recommended before performing other updates to ensure you benefit from the latest features, bug fixes, and security patches in the package manager.

DIFFERENCE: UPDATE VS. UPGRADE

While many Linux package managers use the term 'upgrade' (e.g., apt upgrade, yum upgrade) for updating installed packages, Conda uses 'update'. Despite the different terminology, the core functionality is analogous: to bring installed packages, or the entire environment, to their latest compatible versions according to specified channels and priorities.

HISTORY

The conda package manager was originally developed by Continuum Analytics (now Anaconda, Inc.) and first released in 2012. It was designed to address the complex challenges of dependency management and environment isolation, particularly for Python, R, and other data science languages, which traditional system package managers often struggled with. The conda update command has been a fundamental component of the Conda ecosystem since its early versions, providing a robust and intelligent mechanism for maintaining up-to-date and stable computational environments. Its development has continuously evolved alongside Conda itself, incorporating advanced features such as improved dependency resolution algorithms, enhanced channel priority management, and support for a growing array of package formats.

SEE ALSO

conda install(1), conda create(1), conda remove(1), conda clean(1), conda env(1)

Copied to clipboard