Skip to main content
The pixi upgrade command upgrades dependencies by loosening version constraints in the manifest, then updating the lock file.

Usage

Overview

The pixi upgrade command:
  1. Loosens version constraints in the manifest
  2. Updates the lock file with newer versions
  3. Modifies pixi.toml or pyproject.toml
  4. Installs upgraded environments (unless --no-install)
Unlike pixi update, pixi upgrade modifies your manifest file. Always review changes before committing.

Upgrade vs Update

Arguments

string
Specific package(s) to upgrade. If not provided, all packages are upgraded.

Options

Feature Filter

string
Upgrade packages in specific feature. If not specified, all features are upgraded.Short flag: -f

Package Exclusion

string
Exclude specific package(s) from upgrade. Can be specified multiple times. Conflicts with positional packages.

Installation Control

boolean
default:"false"
Update manifest and lock file without installing.
boolean
default:"false"
Show what would be upgraded without making changes.Short flag: -n

Lock File Usage

boolean
default:"false"
Don’t update the lock file.Env: PIXI_FROZEN
boolean
default:"false"
Require lock file to be up-to-date.Env: PIXI_LOCKED
Using --frozen or --locked with pixi upgrade will not make changes or display results. Use --dry-run instead.

Output Format

boolean
default:"false"
Output changes in JSON format.

Examples

Upgrade All Packages

Before pixi.toml:
Output:
After pixi.toml:

Upgrade Specific Package

Before:
Output:
After:

Upgrade Multiple Packages

Output:

Upgrade with Exclusions

Upgrades all packages except python and cuda.

Upgrade Specific Feature

Before:
Output:
After:

Dry Run

Preview changes without modifying files:
Output:

JSON Output

Output:

No Upgrades Available

Output:

Upgrade Behavior

Version Specification Types

Detailed Version Spec

Before:
After upgrade:
Only version is updated, other fields preserved.

Simple Version Spec

Before:
After upgrade:

Non-Version Specs

These are not upgraded:
Output:

PyProject.toml Handling

For pyproject.toml projects, pixi checks for python in tool.pixi.dependencies:
Output:
Python is not upgraded because it’s not in tool.pixi.dependencies.

Platform-Specific Upgrades

For platform-specific dependencies:
Both cuda (linux-64) and metal (osx-arm64) are upgraded. After:

Build Constraints

For detailed specs with build strings:
After upgrade:
Wildcard build strings are preserved. Exact build strings are removed during upgrade.

Use Cases

Major Version Upgrade

Refresh All Dependencies

Useful after:
  • Long time without updates
  • Major dependency releases
  • Security advisories

Upgrade Dev Dependencies Only

After:

CI/CD Integration

Automatic upgrade checks:

Gradual Migration

Upgrade one package at a time:

Global Options

string
Path to pixi.toml, pyproject.toml, or workspace directory.Short flag: -m

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 with suggestions:

No Upgrades Available

Output:
Possible reasons:
  • Already at latest version
  • Package is git/url/path spec (not upgradable)
  • Package not in selected feature

Solver Conflicts

Error: cannot solve dependencies Solution: Upgrade dependencies together:
Or use --dry-run to identify conflicts:

Manifest Not Modified

If manifest is not updated, package might be:
  1. Git dependency: Not upgradable
  2. URL dependency: Not upgradable
  3. Path dependency: Not upgradable
  4. Python in pyproject.toml: Must be in tool.pixi.dependencies

Best Practices

  1. Always use —dry-run first:
  2. Test after upgrades:
  3. Upgrade gradually for large projects:
  4. Review manifest changes:
  5. Commit manifest and lock together:
  6. Use feature isolation:
  7. Document breaking changes:

Common Workflows

Security Update Workflow

Major Version Migration

Quarterly Maintenance

See Also