方法一:让Anaconda自行决定清理
实行命令
我的Anaconda安装在D盘,具体位置如下。你的应该也能找到对应的位置
D:\*****\**\Anaconda3\pkgs
- (base) C:\Users\Liu_J>conda clean -p
- WARNING: C:\Users\***\.conda\pkgs does not exist
- WARNING: C:\Users\***\AppData\Local\conda\conda\pkgs does not exist
- Cache location: D:\ProgramData\Anaconda3\pkgs
- Will remove the following packages:
- D:\*****\**\Anaconda3\pkgs
- -----------------------------
- blas-1.0-mkl 16 KB
- ca-certificates-2022.10.11-haa95532_0 454 KB
- certifi-2021.5.30-py36haa95532_0 278 KB
- certifi-2022.9.24-py38haa95532_0 311 KB
- cffi-1.15.1-py38h2bbff1b_2 801 KB
- cryptography-38.0.1-py38h21b164f_0 4.9 MB
- idna-3.3-pyhd3eb1b0_0 289 KB
- idna-3.4-py38haa95532_0 516 KB
- libdeflate-1.8-h2bbff1b_5 206 KB
- libffi-3.4.2-hd77b12b_6 801 KB
- libtiff-4.4.0-h8a3f274_2 3.5 MB
- libwebp-1.2.4-h2bbff1b_0 191 KB
- libwebp-base-1.2.4-h2bbff1b_0 903 KB
- numpy-1.22.3-py38h7a0a035_0 80 KB
- numpy-1.23.4-py38h3b20f71_0 30 KB
- numpy-1.26.3-py310h055cbcc_0 33 KB
- numpy-base-1.23.4-py38h4da318b_0 25.9 MB
- openssl-1.1.1s-h2bbff1b_0 22.3 MB
- pillow-9.2.0-py38hdc2b20a_1 3.0 MB
- pip-21.2.2-py36haa95532_0 9.0 MB
- pip-22.2.2-py38haa95532_0 11.0 MB
- python-3.6.13-h3758d61_0 59.3 MB
- python-3.8.15-h6244533_2 64.4 MB
- pytorch-1.12.1-py3.8_cuda11.3_cudnn8_0 293.3 MB
- pytorch-mutex-1.0-cuda 7 KB
- requests-2.27.1-pyhd3eb1b0_0 220 KB
- requests-2.28.1-py38haa95532_0 396 KB
- setuptools-58.0.4-py36haa95532_0 4.1 MB
- setuptools-65.5.0-py38haa95532_0 6.3 MB
- sqlite-3.40.0-h2bbff1b_0 3.8 MB
- torchaudio-0.12.1-py38_cu113 9.2 MB
- torchvision-0.13.1-py38_cu113 15.7 MB
- typing_extensions-4.3.0-py38haa95532_0 181 KB
- urllib3-1.26.12-py38haa95532_0 761 KB
- vc-14.2-h21ff451_1 23 KB
- wincertstore-0.2-py36h7fe50ca_0 39 KB
- xz-5.2.6-h8cc25b3_0 1.1 MB
- ---------------------------------------------------
- Total: 543.2 MB
- Proceed ([y]/n)? y
- removing blas-1.0-mkl
- removing ca-certificates-2022.10.11-haa95532_0
- removing certifi-2021.5.30-py36haa95532_0
- removing certifi-2022.9.24-py38haa95532_0
- removing cffi-1.15.1-py38h2bbff1b_2
- removing cryptography-38.0.1-py38h21b164f_0
- removing idna-3.3-pyhd3eb1b0_0
- removing idna-3.4-py38haa95532_0
- removing libdeflate-1.8-h2bbff1b_5
- removing libffi-3.4.2-hd77b12b_6
- removing libtiff-4.4.0-h8a3f274_2
- removing libwebp-1.2.4-h2bbff1b_0
- removing libwebp-base-1.2.4-h2bbff1b_0
- removing numpy-1.22.3-py38h7a0a035_0
- removing numpy-1.23.4-py38h3b20f71_0
- removing numpy-1.26.3-py310h055cbcc_0
- removing numpy-base-1.23.4-py38h4da318b_0
- removing openssl-1.1.1s-h2bbff1b_0
- removing pillow-9.2.0-py38hdc2b20a_1
- removing pip-21.2.2-py36haa95532_0
- removing pip-22.2.2-py38haa95532_0
- removing python-3.6.13-h3758d61_0
- removing python-3.8.15-h6244533_2
- removing pytorch-1.12.1-py3.8_cuda11.3_cudnn8_0
- removing pytorch-mutex-1.0-cuda
- removing requests-2.27.1-pyhd3eb1b0_0
- removing requests-2.28.1-py38haa95532_0
- removing setuptools-58.0.4-py36haa95532_0
- removing setuptools-65.5.0-py38haa95532_0
- removing sqlite-3.40.0-h2bbff1b_0
- removing torchaudio-0.12.1-py38_cu113
- removing torchvision-0.13.1-py38_cu113
- removing typing_extensions-4.3.0-py38haa95532_0
- removing urllib3-1.26.12-py38haa95532_0
- removing vc-14.2-h21ff451_1
- removing wincertstore-0.2-py36h7fe50ca_0
- removing xz-5.2.6-h8cc25b3_0
复制代码 方法二:安全的删除pkgs全部的包
这个重要是清理缓存包,不会直接影响已经创建的假造环境
命令如下:
这里可以清楚 4.59G
附上 conda clean 命令大全
- usage: conda 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.
- Examples:
- conda clean --tarballs
复制代码
最后 pkgs的大小从13G--》8.5G
虽然搜身 但是还是很大
免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。 |