conda clean#

Remove unused packages and caches.

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

Removal Targets#

-a, --all

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

-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#

--json

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

--console

Select the backend to use for normal output rendering.

-v, --verbose

Can be used multiple times. Once for detailed output, twice for INFO logging, thrice for DEBUG logging, four times for TRACE logging.

-q, --quiet

Do not display progress bar.

-d, --dry-run

Only display what would have been done.

-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