Skip to main content
The pixi global update command updates packages in global environments to their latest compatible versions, maintaining executable exposures.

Usage

Arguments

string
Name(s) of environment(s) to update. If not specified, updates all environments.Multiple environments can be specified.

Behavior

Updating All Environments

When no environments are specified:
This will:
  1. Prune old/unused environments and completions
  2. Update all environments to latest package versions
  3. Maintain all executable exposures
  4. Update shell completions

Updating Specific Environments

When environments are specified:
This will:
  1. Update packages in specified environments only
  2. Preserve executable exposure configurations
  3. Update completions for affected environments

Exposure Preservation

The update command intelligently maintains executable exposures:
  • If all executables were auto-exposed, new executables are also exposed
  • If only specific executables were exposed, the same subset is maintained

Update Process

For each environment:
  1. Check if environment is in sync
  2. Detect currently exposed executables
  3. Install latest package versions
  4. Sync executable exposures (preserving exposure strategy)
  5. Update shortcuts and completions

Examples

Update All Environments

Example output:

Update Single Environment

Updates only the python311 environment.

Update Multiple Specific Environments

Updates three environments, leaving others unchanged.

Update with Dry Run

State Changes Reported

After successful update, pixi reports:
  • Package version changes
  • Newly exposed executables
  • Updated completions
Example output:

update vs upgrade

  • pixi global update: Updates packages within version constraints from manifest
  • pixi global upgrade: (Deprecated) Use pixi global update instead

update vs install

  • pixi global update: Updates existing environments
  • pixi global install: Creates or reinstalls environments

update vs sync

  • pixi global update: Installs latest versions, modifying lock
  • pixi global sync: Installs exact versions from manifest/lock without updating

When to Use Update

Regular Maintenance

Update all environments periodically:

After Manifest Changes

After manually editing the global manifest:

Security Updates

Get latest security patches:

New Features

Update specific tools to get new features:

Exposure Strategy Detection

Auto-Expose All

If all executables were previously exposed:

Manual Exposure

If only specific executables were exposed:
To expose new executables after update:

Pruning Old Environments

When updating all environments, pixi automatically:
  • Removes environments not in the manifest
  • Cleans up orphaned completion files (Unix)
  • Removes unused directories
Example output:

Update Failures

If an update fails, pixi reverts the environment to its previous state.
Example:
The error doesn’t affect other environments:

Troubleshooting

Version Conflicts

Error: cannot satisfy version constraints Solution: Check dependencies in manifest:

Package Not Found

Error: package 'xyz' not found Solution: Package may have been removed or renamed:

Environment Out of Sync

Warning: environment not in sync The update command automatically syncs before updating:

Exposure Changes

Unexpected executables exposed/removed: Check exposure strategy:

Update Taking Too Long

Update specific environments instead of all:

Advanced Usage

Update Before Running

Ensure tools are up-to-date before use:

Selective Updates

Update only production environments:
Keep development environments on specific versions:

Update and Test

Batch Update Script

Performance Considerations

Updating specific environments is faster than updating all:

Config Options

boolean
Disable TLS certificate verification.
string
Path to authentication file.

Best Practices

Regular Updates

Schedule regular updates:

Review Changes

Check what changed after update:

Pin Critical Versions

For stability-critical environments, pin versions:

Test After Update

Verify critical tools work after update:

Environment Variables

No environment variables affect pixi global update.

Exit Codes

  • 0: All environments updated successfully
  • 1: One or more environments failed to update

See Also