main_clean#

CLI implementation for conda clean.

Removes cached package tarballs, index files, package metadata, temporary files, and log files.

Functions#

configure_parser(→ argparse.ArgumentParser)

_get_size(→ int)

_get_pkgs_dirs(→ dict[str, tuple[str, Ellipsis]])

_get_total_size(→ int)

_rm_rf(→ None)

find_tarballs(→ dict[str, Any])

find_pkgs(→ dict[str, Any])

rm_pkgs(→ None)

find_index_cache(→ list[str])

find_pkgs_dirs(→ list[str])

find_tempfiles(→ list[str])

find_logfiles(→ list[str])

rm_items(→ None)

_execute(args, parser)

execute(→ int)

configure_parser(sub_parsers: argparse._SubParsersAction, **kwargs) argparse.ArgumentParser#
_get_size(*parts: str, warnings: list[str] | None) int#
_get_pkgs_dirs(pkg_sizes: dict[str, dict[str, int]]) dict[str, tuple[str, Ellipsis]]#
_get_total_size(pkg_sizes: dict[str, dict[str, int]]) int#
_rm_rf(*parts: str, quiet: bool, verbose: bool) None#
find_tarballs() dict[str, Any]#
find_pkgs() dict[str, Any]#
rm_pkgs(pkgs_dirs: dict[str, tuple[str]], warnings: list[str], total_size: int, pkg_sizes: dict[str, dict[str, int]], *, quiet: bool, verbose: bool, dry_run: bool, name: str) None#
find_index_cache() list[str]#
find_pkgs_dirs() list[str]#
find_tempfiles(paths: Iterable[str]) list[str]#
find_logfiles() list[str]#
rm_items(items: list[str], *, quiet: bool, verbose: bool, dry_run: bool, name: str) None#
_execute(args, parser)#
execute(args: argparse.Namespace, parser: argparse.ArgumentParser) int#