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 …]

PARAMETERS

-n ENV, --name ENV
    Update packages in named environment

-p PATH, --prefix PATH
    Update packages in environment at path

--all
    Update all packages in environment

--dry-run
    Show what would be done without executing

--force-reinstall
    Reinstall even if latest version

--no-deps
    Ignore dependencies for update

--prune
    Remove untracked packages from environment

--solver classic|libmamba
    Select dependency solver

-c CHANNEL, --channel CHANNEL
    Add channel for packages

--override-channels
    Ignore configured channels

-h, --help
    Show full help

DESCRIPTION

The conda update command is a core tool in the Conda package manager, used to upgrade packages within a Conda environment to their latest compatible versions. Conda, part of the Anaconda distribution, manages packages and dependencies for Python, R, and other languages across platforms including Linux.

It resolves complex dependency graphs using satisfiability (SAT) solvers, ensuring updates maintain environment consistency. By default, it updates specified packages or all if --all is used, respecting channel priorities and pinned specs.

Common use cases include keeping environments current: conda update conda self-updates the manager, while conda update --all refreshes everything. It supports multiple channels like conda-forge and anaconda, and can target specific environments with -n. Updates are atomic via transaction previews, with options for dry-runs to simulate changes.

This command enhances reproducibility in data science workflows, avoiding conflicts common in pip-only setups. Note: solver performance improved in Conda 4.7+ with faster libmamba integrations.

CAVEATS

Updates may fail due to strict channel priorities or pinned packages; use conda config --set channel_priority flexible if needed.
Solver can be slow on large environments; consider mamba for speed.
Always review transaction with --dry-run to avoid breaking dependencies.

ENVIRONMENT ACTIVATION

Activate env first with source activate myenv or use -n; updates apply only to active/target env.

CHANNEL CONFIGURATION

~/.condarc defines defaults; prioritize conda-forge for open-source packages.

HISTORY

Conda originated in 2012 from Anaconda's need for non-Python packages. conda update evolved with version 4.0 (2016) adding multi-language support. Conda 23.7+ integrated faster mamba solver, improving update reliability and speed.

SEE ALSO

conda(1), conda-install(1), conda-list(1), mamba(1), pip(1)

Copied to clipboard