Synchronizes the global manifest with installed environments. This ensures all environments match their definitions and cleans up any inconsistencies.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/prefix-dev/pixi/llms.txt
Use this file to discover all available pages before exploring further.
Usage
pixi g sync
What It Does
- Prunes old environments - Removes environments not listed in the manifest
- Syncs each environment - Updates environments to match their manifests
- Removes broken files - Cleans up any broken symlinks or files
- Prunes completions (Unix only) - Removes outdated shell completion scripts
Examples
Sync all environments
When nothing needs syncing
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: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
Differences from Other Commands
| Command | Purpose |
|---|---|
pixi global sync | Synchronize all environments |
pixi global install | Install new packages |
pixi global remove | Remove packages from an environment |
pixi global uninstall | Remove entire environments |
Automatic Syncing
Pixi automatically syncs during:pixi global installpixi global removepixi global uninstall
pixi global sync manually when:
- Fixing issues
- After manual changes
- When explicitly warned by pixi