Skip to main content
The pixi update command updates the lock file to use newer versions of dependencies while respecting manifest constraints.

Usage

pixi update [OPTIONS] [PACKAGES]...

Overview

The pixi update command:
  1. Unlocks specified packages in the lock file
  2. Re-resolves dependencies to find newer versions
  3. Updates the lock file with new versions
  4. Installs updated environments (unless --no-install)
pixi update respects version constraints in your manifest. It will only update to versions that satisfy your specifications.

Arguments

PACKAGES
string
Specific package(s) to update. If not provided, all packages are updated.
pixi update              # Update all packages
pixi update numpy        # Update only numpy
pixi update numpy pandas # Update numpy and pandas

Options

Environment Filter

--environment
string
Update only in specific environment(s). Can be specified multiple times.Short flag: -e
pixi update --environment prod
pixi update -e test -e dev

Platform Filter

--platform
string
Update only for specific platform(s). Can be specified multiple times.Short flag: -p
pixi update --platform linux-64
pixi update -p linux-64 -p osx-arm64

Installation Control

--no-install
boolean
default:"false"
Update lock file without installing. Useful for batch updates.
pixi update --no-install
pixi install  # Install later
--dry-run
boolean
default:"false"
Show what would be updated without making changes.Short flag: -n
pixi update --dry-run

Output Format

--json
boolean
default:"false"
Output changes in JSON format.
pixi update --json > changes.json

Examples

Update All Packages

pixi update
Output:
Updating lock file...
✓ Updated 12 packages:
  • numpy: 1.26.0 → 1.26.4
  • pandas: 2.1.0 → 2.2.0
  • python: 3.11.5 → 3.11.8

Update Specific Package

pixi update numpy
Output:
✓ Updated numpy: 1.26.0 → 1.26.4

Update Multiple Packages

pixi update numpy pandas scipy
Output:
✓ Updated 3 packages:
  • numpy: 1.26.0 → 1.26.4
  • pandas: 2.1.0 → 2.2.0
  • scipy: 1.11.0 → 1.12.0

Update for Specific Environment

pixi update --environment prod
Output:
✓ Updated prod environment:
  • python: 3.11.5 → 3.11.8
  • numpy: 1.26.0 → 1.26.4

Update for Specific Platform

pixi update --platform linux-64
Output:
✓ Updated linux-64 platform:
  • cuda: 12.1.0 → 12.2.0
  • cudatoolkit: 11.8.0 → 12.1.0

Dry Run

See what would be updated without making changes:
pixi update --dry-run
Output:
Would update 8 packages:
  • numpy: 1.26.0 → 1.26.4
  • pandas: 2.1.0 → 2.2.0
  • python: 3.11.5 → 3.11.8
  ...

JSON Output

pixi update --json
Output:
{
  "version": "1",
  "environments": {
    "default": {
      "linux-64": {
        "updated": [
          {
            "name": "numpy",
            "before": "1.26.0",
            "after": "1.26.4"
          }
        ]
      }
    }
  }
}

No Changes

When already up-to-date:
pixi update
Output:
✓ Lock-file was already up-to-date

Behavior Details

Version Constraint Respect

Manifest:
[dependencies]
numpy = ">=1.20,<2.0"
pixi update numpy
Result: Updates to latest 1.x version (e.g., 1.26.4), not 2.0+

Dependency Updates

Updating a package also updates its dependencies:
pixi update pandas
May also update:
  • numpy (pandas dependency)
  • python-dateutil (pandas dependency)
  • Other transitive dependencies

Platform-Specific Updates

With platform-specific dependencies:
[target.linux-64.dependencies]
cuda = ">=12.0"

[target.osx-arm64.dependencies]
metal = "*"
pixi update --platform linux-64
Only updates cuda and linux-64 packages, not metal.

Environment-Specific Updates

[feature.test.dependencies]
pytest = ">=8.0"

[feature.prod.dependencies]
gunicorn = ">=20.0"

[environments]
test = ["test"]
prod = ["prod"]
pixi update --environment test
Only updates packages in the test environment.

Combining Filters

Package + Environment

pixi update numpy --environment prod
Updates numpy only in the prod environment.

Package + Platform

pixi update cuda --platform linux-64
Updates cuda only for linux-64 platform.

Environment + Platform

pixi update --environment prod --platform linux-64
Updates all packages in prod environment on linux-64 platform.

All Filters Combined

pixi update numpy pandas \
  --environment prod \
  --platform linux-64 \
  --no-install
Updates numpy and pandas in prod environment for linux-64, without installing.

Update vs Upgrade

pixi update and pixi upgrade are different commands:
Featurepixi updatepixi upgrade
Modifies manifestNoYes
Respects constraintsYesLoosens constraints
Updates lock fileYesYes
Use caseRegular updatesMajor version bumps
# Update within constraints
pixi update numpy  # 1.26.0 → 1.26.4

# Upgrade to newer version
pixi upgrade numpy  # 1.26.0 → 2.0.0 (updates manifest)

Use Cases

Regular Maintenance

Keep dependencies up-to-date:
# Weekly update routine
pixi update
pixi run pytest  # Test after update

Security Patches

Update specific vulnerable package:
pixi update requests

Pre-Production Testing

Test updates without affecting dev:
pixi update --environment staging --dry-run

CI/CD Integration

Automated update checks:
#!/bin/bash
if pixi update --dry-run | grep -q "Would update"; then
  echo "Updates available"
  pixi update --no-install
  pixi install
  pixi run pytest
fi

Multi-Platform Maintenance

Update each platform separately:
pixi update --platform linux-64
pixi update --platform osx-arm64
pixi update --platform win-64

Global Options

--manifest-path
string
Path to pixi.toml, pyproject.toml, or workspace directory.Short flag: -m
pixi update --manifest-path /path/to/project

Config Options

  • --auth-file <FILE>: Authentication credentials
  • --tls-no-verify: Disable TLS verification
  • --concurrent-solves <N>: Max concurrent solves

Troubleshooting

Package Not Found

Error: could not find a package named 'numpyy' Solution: Check spelling and verify package is in lock file:
pixi list | grep numpy
pixi update numpy
Suggestions will be provided:
Error: could not find a package named 'numpyy'
Help: did you mean 'numpy'?

No Updates Available

pixi update numpy
Output:
✓ Lock-file was already up-to-date
Package is already at the latest version satisfying constraints.

Version Constraints Too Strict

Manifest:
[dependencies]
numpy = "==1.20.0"  # Pinned exactly
pixi update numpy
Output:
✓ Lock-file was already up-to-date
Solution: Loosen constraints or use pixi upgrade:
pixi upgrade numpy  # Loosens constraint

Solver Conflicts

Error: cannot solve dependencies Solution: Update conflicting packages together:
pixi update numpy pandas scipy  # Update all at once
Or check manifest constraints:
[dependencies]
numpy = ">=1.20,<2.0"
pandas = ">=2.0"  # May require numpy >=1.24

Environment Not Found

Error: could not find an environment named 'production' Solution: Check environment names:
pixi info
Use correct environment name:
pixi update --environment prod  # not 'production'

Best Practices

  1. Update regularly to get security patches:
    pixi update  # Weekly or monthly
    
  2. Test after updates:
    pixi update
    pixi run pytest
    
  3. Use dry-run first for large projects:
    pixi update --dry-run
    pixi update  # If changes look good
    
  4. Update environments separately in multi-env projects:
    pixi update --environment dev
    pixi update --environment prod  # After testing
    
  5. Commit lock file changes:
    pixi update
    git add pixi.lock
    git commit -m "Update dependencies"
    
  6. Use CI to detect updates:
    # .github/workflows/update-check.yml
    - run: pixi update --dry-run
    

See Also