pixi reinstall command reinstalls environments, updating the lockfile if needed and reinstalling packages from scratch.
Usage
Arguments
Specific package(s) to reinstall. If not provided, the entire environment is reinstalled.Multiple packages can be specified.
Behavior
Full Environment Reinstall
When no packages are specified, the entire environment is reinstalled:- Update the lockfile if it’s out of date
- Remove all installed packages in the environment
- Reinstall all packages from the lockfile
Selective Package Reinstall
When specific packages are provided, only those packages are reinstalled:Options
Environment Selection
The environment to reinstall. Can be specified multiple times to reinstall multiple environments.Short flag:
-eDefaults to the default environment if not specified.All Environments
Reinstall all environments in the workspace.Short flag:
-aConflicts with --environment.Use
--all to reinstall every environment defined in your workspace in one command.Lock File Options
Reinstall using the existing lock file without updating it.Env:
PIXI_FROZENCheck if lock file is up-to-date before reinstalling. Abort if not.Env:
PIXI_LOCKEDExamples
Reinstall Default Environment
Reinstall Specific Environment
Reinstall Multiple Environments
Reinstall All Environments
Reinstall Specific Packages
Reinstall Package in Specific Environment
Reinstall Without Updating Lock
When to Use Reinstall
Corrupted Environment
If your environment is corrupted or packages are in an inconsistent state:After System Changes
After system updates or when packages aren’t behaving correctly:Testing Clean Installation
To verify that all dependencies install correctly from scratch:Package Conflicts
When experiencing package conflicts or import errors:Comparison with Other Commands
reinstall vs install
pixi install: Installs missing packages, keeps existing onespixi reinstall: Removes and reinstalls packages, ensuring clean state
reinstall vs update
pixi update: Updates packages to newer versions within constraintspixi reinstall: Reinstalls current versions from lockfile
reinstall vs upgrade
pixi upgrade: Upgrades to latest versions, updating lockfilepixi reinstall: Reinstalls without changing versions (unless lockfile is updated)
Global Options
Path to
pixi.toml, pyproject.toml, or workspace directory.Short flag: -mConfig Options
These options override global configuration:--tls-no-verify: Disable TLS verification--auth-file <FILE>: Path to authentication file--pypi-keyring-provider <PROVIDER>: Keyring provider for PyPI
Troubleshooting
Environment Not Found
Error:environment 'xyz' not found
Solution: Check available environments:
Lock File Out of Date
Error:lock file is out of date
Solution: Update the lock file or use --frozen:
Package Not in Environment
Error:package 'xyz' not found in environment
Solution: Verify the package is in the environment:
Performance Notes
For large environments:See Also
- pixi install - Install dependencies
- pixi update - Update dependencies
- pixi upgrade - Upgrade dependencies to latest versions
- pixi clean - Clean up workspace cache