pixi upgrade command upgrades dependencies by loosening version constraints in the manifest, then updating the lock file.
Usage
Overview
Thepixi upgrade command:
- Loosens version constraints in the manifest
- Updates the lock file with newer versions
- Modifies
pixi.tomlorpyproject.toml - Installs upgraded environments (unless
--no-install)
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:
-fPackage 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:
-nLock File Usage
boolean
default:"false"
Don’t update the lock file.Env:
PIXI_FROZENboolean
default:"false"
Require lock file to be up-to-date.Env:
PIXI_LOCKEDOutput Format
boolean
default:"false"
Output changes in JSON format.
Examples
Upgrade All Packages
pixi.toml:
pixi.toml:
Upgrade Specific Package
Upgrade Multiple Packages
Upgrade with Exclusions
python and cuda.
Upgrade Specific Feature
Dry Run
Preview changes without modifying files:JSON Output
No Upgrades Available
Upgrade Behavior
Version Specification Types
Detailed Version Spec
Before:version is updated, other fields preserved.
Simple Version Spec
Before:Non-Version Specs
These are not upgraded:PyProject.toml Handling
Forpyproject.toml projects, pixi checks for python in tool.pixi.dependencies:
tool.pixi.dependencies.
Platform-Specific Upgrades
For platform-specific dependencies:cuda (linux-64) and metal (osx-arm64) are upgraded.
After:
Build Constraints
For detailed specs with build strings:Use Cases
Major Version Upgrade
Refresh All Dependencies
- Long time without updates
- Major dependency releases
- Security advisories
Upgrade Dev Dependencies Only
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: -mConfig 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
- 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:
--dry-run to identify conflicts:
Manifest Not Modified
If manifest is not updated, package might be:-
Git dependency: Not upgradable
-
URL dependency: Not upgradable
-
Path dependency: Not upgradable
-
Python in pyproject.toml: Must be in
tool.pixi.dependencies
Best Practices
-
Always use —dry-run first:
-
Test after upgrades:
-
Upgrade gradually for large projects:
-
Review manifest changes:
-
Commit manifest and lock together:
-
Use feature isolation:
-
Document breaking changes:
Common Workflows
Security Update Workflow
Major Version Migration
Quarterly Maintenance
See Also
- pixi update - Update without modifying manifest
- pixi add - Add dependencies
- pixi remove - Remove dependencies