当前位置:   article > 正文

C盘下Anaconda瘦身_在c盘上下载了anaconda

在c盘上下载了anaconda

Anaconda瘦身
刚用了一年的anaconda,存储占用8G, 过大。

可以看到有很多库,不同版本的库,这里可以用conda自带的清理命令行来处理一下。
在这里插入图片描述
点右上角的所有应用,进入anaconda命令行环境

conda clean 命令方参数

$ conda clean -h

![在这里插入图片描述](https://img-blog.csdnimg.cn/32f87d6f2bf34ffab88aacd8be3f83dc.png)
usage: conda clean [-h] [-a] [-i] [-l] [-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.
  -l, --lock            Remove all conda lock files.
  -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.
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40

删除索引文件,缓存库文件
conda clean --all --dry-run
在这里插入图片描述
删除2G存储

卸载不用的虚拟环境(重要!)
列出虚拟环境的例子, 截图如上。

conda env list

卸载不需要的环境

conda remove -n (要卸载的环境的名字) --all

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/繁依Fanyi0/article/detail/144116
推荐阅读
相关标签
  

闽ICP备14008679号