Skip to main content
Removes dependencies from a global environment. To remove the entire environment, use pixi global uninstall instead.

Usage

pixi global remove [OPTIONS] <PACKAGE>...
Alias: pixi g remove, pixi g rm

Arguments

PACKAGE
string
required
Package(s) to remove from the environment.Multiple packages can be specified.

Options

--environment
string
required
The environment from which dependencies should be removed.

Examples

Remove a package from an environment

pixi global remove --environment python numpy

Remove multiple packages

pixi global remove --environment python numpy pandas matplotlib

How It Works

  1. Removes the package from the environment’s manifest
  2. Removes exposed executables that belong to the package
  3. Syncs the environment to reflect the changes
  4. Updates shortcuts if applicable
The --environment flag is required. If you want to remove the entire environment, use pixi global uninstall instead.

Use Cases

Clean Up Dependencies

Remove packages you no longer need:
pixi global remove --environment ds old-package

Remove Additional Dependencies

If you installed packages with --with, you can remove them:
# Previously installed:
# pixi global install jupyter --with matplotlib

# Remove matplotlib:
pixi global remove --environment jupyter matplotlib

What Gets Removed

  • The package entry from the environment’s manifest
  • Exposed executables from that package
  • The package and its unique dependencies from the environment

What Doesn’t Get Removed

  • Shared dependencies (used by other packages in the environment)
  • The environment itself (use pixi global uninstall for that)

Error Handling

If the removal fails, pixi will attempt to revert the changes:
pixi global remove --environment myenv package-name
# If this fails, the environment remains in its previous state
Use pixi g rm as a shorthand for pixi global remove.

Viewing Changes

After removal, you can check the environment:
pixi global list --environment myenv

Complete Example

# Install jupyter with extra packages
pixi global install --environment science jupyter matplotlib pandas numpy

# Later, remove matplotlib and pandas
pixi global remove --environment science matplotlib pandas

# Verify the changes
pixi global list --environment science

Differences from pixi global uninstall

Featureglobal removeglobal uninstall
ScopeRemoves packagesRemoves environment
Requires --environmentYesNo
Keeps environmentYesNo
Removes executablesOnly from removed packagesAll

Syncing After Removal

The environment is automatically synced after removal. If you want to ensure everything is in sync:
pixi global sync