Forrest logo
back to the conda tool

conda:tldr:93b0a

conda: Delete unused packages and caches.
$ conda clean --all
try on your machine

The command "conda clean --all" is used in the conda package manager to clean up unused packages and temporary files from the conda environment.

Here's a breakdown of the command:

  • "conda" refers to the conda package manager.
  • "clean" is the command used to initiate the cleaning process.
  • "--all" is an option that tells conda to clean up all unused packages and files, including packages that are not necessary for the current environment.

When you run this command, conda will perform the following tasks:

  1. Removes cached package files (.tar.bz2) from the package cache directory.
  2. Clears the index caches used for searching packages.
  3. Removes unused packages that were previously installed but are no longer needed by any environment.
  4. Deletes orphaned packages, which are packages that were installed as dependencies but are no longer needed by any environment.
  5. Clears temporary files created during package installation or update.

Using "conda clean --all" periodically can help reclaim disk space by removing unnecessary packages and files. However, be cautious as it permanently removes these files, and they cannot be recovered after cleaning.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.

Questions that are answered by this command:

  • 清除conda缓存?
back to the conda tool