【Anaconda】Anaconda空间清理

您所在的位置:网站首页 页面文件已用很大怎么办 【Anaconda】Anaconda空间清理

【Anaconda】Anaconda空间清理

#【Anaconda】Anaconda空间清理| 来源: 网络整理| 查看: 265

文章目录 Anaconda 环境安装包与Cache清理常用的命令所有功能

Anaconda 环境安装包与Cache清理

当初给笔记本C盘只分配了100G的内存,用了好几年现在C盘可用空间越来越少了。之前装了不少anaconda的环境,想着释放一些无用的包可以达到释放空间的效果。

常用的命令

删除没有环境使用的所有的安装包及cache

# 全给我删了!也别再问我了!当然不会正在用的包删了:) conda clean --all -y # 把没用到的包删了哦~ conda clean -p 所有功能

想要使用某一个功能非常简单,把一个命令的功能摸透才有乐趣。

(condaenv) C:\Users\>conda clean -h usage: conda-script.py clean [-h] [-a] [-i] [-p] [-t] [-f] [-c TEMPFILES [TEMPFILES ...]] [-d] [--json] [-q] [-v] [-y] Remove unused packages and caches. Options: optional arguments: -h, --help Show this help message and exit. 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 [TEMPFILES ...], --tempfiles TEMPFILES [TEMPFILES ...] Remove temporary files that could not be deleted earlier due to being in-use. Argument is path(s) to prefix(es) where files should be found and removed. 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 Do not ask for confirmation.

英语解释一下看着有点费力,毕竟是中文blog。

conda clean 后面可以跟很多超参,不同超参有不同的功能: 可选参数: -h -help 呼出帮助 选择要删除的目标: -a, --all 移除索引缓存,锁定文件,未使用的缓存包和tarball。 -i, --index-cache 移除索引缓存 -p, --packages 从可写的包缓存中移除未使用的包 -t, --tarballs 移除缓存的软件包tarball。.tar -f, --force-pkgs-dirs (不推荐用)删除所有的可写程序包缓存。该选项不包括在--all标志中。 警告:这将破坏使用符号链接安装回软件包高速缓存安装软件包的环境。 -c TEMPFILES [TEMPFILES ...], --tempfiles TEMPFILES [TEMPFILES ...] 删除由于正在使用而无法删除的临时文件。 参数是应在其中找到和删除文件的前缀的路径。 输出,提示和流控制: -d, --dry-run 仅显示要完成的操作 --json 将所有输出报告为json。 适用于以编程方式使用conda。 -q, --quiet 不要显示进度条,不要cmd里都是乱乱的log! -v, --verbose 可以多次使用。 用一次是INFO,用两次是DEBUG,用三次是TRACE。 -y, --yes 老子就要删,别让我再确认了,麻烦。


【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3