conda clean

Remove unused packages and caches.

Options:

usage: conda clean [-h] [-a] [-i] [-p] [-t] [-f]
                   [-c [TEMPFILES [TEMPFILES ...]]] [-l] [-d] [--json] [-q]
                   [-v] [-y]

Removal Targets

-a, --all

Remove index cache, lock files, unused cache packages, and tarballs.

-i, --index-cache

Remove index cache.

-p, --packages

Remove unused packages from writable package caches. WARNING: This does not check for packages installed using symlinks back to the package cache.

-t, --tarballs

Remove cached package tarballs.

-f, --force-pkgs-dirs

Remove all writable package caches. This option is not included with the --all flag. WARNING: This will break environments with packages installed using symlinks back to the package cache.

-c, --tempfiles

Remove temporary files that could not be deleted earlier due to being in-use. The argument for the --tempfiles flag is a path (or list of paths) to the environment(s) where the tempfiles should be found and removed.

-l, --logfiles

Remove log files.

Output, Prompt, and Flow Control Options

-d, --dry-run

Only display what would have been done.

--json

Report all output as json. Suitable for using conda programmatically.

-q, --quiet

Do not display progress bar.

-v, --verbose

Can be used multiple times. Once for INFO, twice for DEBUG, three times for TRACE.

-y, --yes

Sets any confirmation values to 'yes' automatically. Users will not be asked to confirm any adding, deleting, backups, etc.

Examples:

conda clean --tarballs