Skip to main content

jnc clean

Removes environment directories and caches. When run without a subcommand, it cleans the .pixi folder of the current workspace, removing all installed environments. Use the cache subcommand to clean the global package cache.

Usage

jnc clean [OPTIONS]
jnc clean cache [CACHE_OPTIONS]

Options

OptionShortDescription
--environment <ENV>-eOnly remove the specified environment instead of all environments.
--activation-cacheOnly remove the activation cache.
--buildOnly remove the build cache.

Global Options

OptionShortDescription
--manifest-path <PATH>-mPath to pixi.toml or the workspace directory.

Subcommand: jnc clean cache

Removes cached packages from the global cache directory. Without any flags, removes the entire cache (after confirmation).

Cache Options

OptionDescription
--pypiClean only the PyPI package cache.
--condaClean only the conda package cache.
--repodataClean only the repodata cache.
--mappingClean only the conda-PyPI mapping cache.
--execClean only the exec temporary environment cache.
--build-backendsClean only the build backend environments cache.
--buildClean only build-related caches (git, work dirs, backends, source builds).
--yes / -yAnswer yes to all confirmation prompts.

Examples

Clean all environments in the current workspace:
jnc clean
Clean a specific environment:
jnc clean --environment test
Clean the entire global cache:
jnc clean cache --yes
Clean only the conda package cache:
jnc clean cache --conda
Clean temporary exec environments:
jnc clean cache --exec
Clean build-related caches:
jnc clean cache --build