TheDocumentation 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.
pixi remove command removes dependencies from your workspace manifest and updates the lock file.
Usage
Arguments
The dependency to remove. Can be:
- Package name:
numpy - Multiple packages:
numpy pandas scipy
Options
Dependency Type
Remove a PyPI dependency instead of conda. Conflicts with
--host and --build.Remove a host dependency. Conflicts with
--build and --pypi.Remove a build dependency. Conflicts with
--host and --pypi.Platform-Specific
Remove dependency for specific platform(s). Can be specified multiple times.Short flag:
-pFeature-Specific
Remove dependency from a specific feature.Short flag:
-fUpdate Options
Skip Installation
Don’t reinstall the environment, only update the lock file.
Lock File Usage
Don’t update the lock file.Env:
PIXI_FROZENRequire lock file to be up-to-date.Env:
PIXI_LOCKEDExamples
Remove Single Package
Remove Multiple Packages
Remove PyPI Package
Remove from PyProject.toml
Forpyproject.toml manifests, pixi remove --pypi removes from:
Default feature: project.dependencies
dependency-groups or tool.pixi.pypi-dependencies
Remove Platform-Specific Package
Remove from Feature
Remove Build Dependency
Combining Options
Platform + Feature
cuda from the gpu feature on linux-64 platform only.
Multiple Platforms
numpy from both specified platforms.
PyPI + Feature
pytest from the test feature.
Global Options
Path to
pixi.toml, pyproject.toml, or workspace directory.Short flag: -mBehavior Details
Dependency Detection
Pixi automatically detects where the dependency is defined:- Default dependencies (
[dependencies]) - Platform-specific dependencies (
[target.<platform>.dependencies]) - Feature dependencies (
[feature.<name>.dependencies]) - PyPI dependencies (
[pypi-dependencies]) - Build/host dependencies
Removing Unused Dependencies
Removing a package doesn’t remove its dependencies. Usepixi update to clean up:
Lock File Update
By default,pixi remove:
- Removes package from manifest
- Updates lock file
- Reinstalls environment
--no-install to skip reinstallation:
Exit Status
0: Success1: Package not found in specified location1: Lock file update failed1: Installation failed
Troubleshooting
Package Not Found
Error:package 'numpy' not found in dependencies
Solutions:
- Check if package exists:
- Check feature/platform:
- Check if it’s a PyPI package:
Dependency Still Required
Warning: Other packages may still depend on the removed package. Solution: Check dependencies:Lock File Out of Sync
Error:lock file is out of sync
Solution:
Removing from Wrong Location
If removing doesn’t work, the package might be in:- Different feature: Try
--feature <name> - Different platform: Try
--platform <platform> - PyPI section: Try
--pypi - Build section: Try
--build
Common Workflows
Clean Up Test Dependencies
Remove Platform-Specific CUDA
Remove All PyPI Dev Tools
Switch from Conda to PyPI Package
See Also
- pixi add - Add dependencies
- pixi install - Install dependencies
- pixi update - Update lock file
- pixi list - List installed packages