Skip to main content
Synchronizes the global manifest with installed environments. This ensures all environments match their definitions and cleans up any inconsistencies.

Usage

Alias: pixi g sync

What It Does

  1. Prunes old environments - Removes environments not listed in the manifest
  2. Syncs each environment - Updates environments to match their manifests
  3. Removes broken files - Cleans up any broken symlinks or files
  4. Prunes completions (Unix only) - Removes outdated shell completion scripts

Examples

Sync all environments

Output:

When nothing needs syncing

Output:

When to Use

After Manual Changes

If you’ve manually edited the global manifest:

After Errors

If an installation or removal failed:

When Warned

Pixi will warn you when environments are out of sync:

After System Changes

If you’ve:
  • Restored from backup
  • Moved the pixi directory
  • Manually deleted files

What Gets Synced

Packages

  • Installs missing packages
  • Removes packages no longer in the manifest
  • Updates packages to match specified versions

Exposed Executables

  • Creates missing symlinks
  • Removes broken symlinks
  • Updates symlink targets

Shortcuts

  • Updates desktop/start menu entries
  • Removes outdated shortcuts

Completions

  • Updates shell completion scripts (Unix only)
  • Removes completions for removed environments

Error Handling

If syncing fails for some environments:
Output:
Pixi continues syncing other environments even if one fails.

Use Cases

Restore After Crash

Clean Installation

Fix Broken State

Verify Installation

What Gets Removed

Environments

Environments not in the manifest are removed:

Broken Files

  • Broken symlinks
  • Orphaned executable links
  • Invalid shortcuts

Old Completions

Shell completions for removed environments (Unix only).
pixi global sync is safe to run at any time. It only removes files that are no longer referenced in the manifest.

Global Manifest Location

The global manifest is stored at:
  • Linux/macOS: ~/.pixi/manifests/pixi-global.toml
  • Windows: %USERPROFILE%\.pixi\manifests\pixi-global.toml

Complete Workflow

Run pixi global sync regularly to keep your global installation clean and consistent.

Differences from Other Commands

Automatic Syncing

Pixi automatically syncs during:
  • pixi global install
  • pixi global remove
  • pixi global uninstall
You typically only need to run pixi global sync manually when:
  • Fixing issues
  • After manual changes
  • When explicitly warned by pixi