Anaconda下的pkgs占用空间13G,如何安全的清理(已解决)

2024-02-22 09:28

本文主要是介绍Anaconda下的pkgs占用空间13G,如何安全的清理(已解决),希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

方法一:让Anaconda自行决定清理

执行命令

conda clean -p

我的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 MBProceed ([y]/n)? yremoving 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全部的包

这个主要是清理缓存包,不会直接影响已经创建的虚拟环境

命令如下:

conda clean --all

(base) C:\Us***\****>conda clean --all
Cache location: D:\ProgramData\Anaconda3\pkgs
Will remove the following tarballs:D:\*****\**\Anaconda3\pkgs
-----------------------------
blas-1.0-mkl.conda                             6 KB
brotli-python-1.0.9-py310hd77b12b_7.conda     309 KB
brotlipy-0.7.0-py38h2bbff1b_1003.conda       412 KB
bzip2-1.0.8-he774522_0.conda                 113 KB
ca-certificates-2022.10.11-haa95532_0.conda     125 KB
ca-certificates-2022.4.26-haa95532_0.conda     124 KB
ca-certificates-2023.12.12-haa95532_0.conda     127 KB
certifi-2021.5.30-py36haa95532_0.conda       140 KB
certifi-2022.5.18.1-py38haa95532_0.conda     157 KB
certifi-2022.9.24-py38haa95532_0.conda       154 KB
certifi-2023.11.17-py310haa95532_0.conda     159 KB
cffi-1.15.0-py38h2bbff1b_1.conda             223 KB
cffi-1.15.1-py38h2bbff1b_2.conda             235 KB
cffi-1.16.0-py310h2bbff1b_0.conda            244 KB
charset-normalizer-2.0.4-pyhd3eb1b0_0.conda      35 KB
cryptography-37.0.1-py38h21b164f_0.conda     979 KB
cryptography-38.0.1-py38h21b164f_0.conda     992 KB
cryptography-41.0.3-py310h3438e0d_0.conda     1.1 MB
cudatoolkit-11.3.1-h59b6b97_2.conda        545.3 MB
freetype-2.10.4-hd328e21_0.conda             466 KB
freetype-2.12.1-ha860e81_0.conda             490 KB
giflib-5.2.1-h8cc25b3_3.conda                 88 KB
idna-3.3-pyhd3eb1b0_0.conda                   49 KB
idna-3.4-py310haa95532_0.conda                97 KB
idna-3.4-py38haa95532_0.conda                 94 KB
intel-openmp-2021.4.0-haa95532_3556.conda     2.2 MB
intel-openmp-2023.1.0-h59b6b97_46320.conda     2.7 MB
jpeg-9e-h2bbff1b_0.conda                     292 KB
jpeg-9e-h2bbff1b_1.conda                     320 KB
lerc-3.0-hd77b12b_0.conda                    120 KB
libdeflate-1.17-h2bbff1b_1.conda             153 KB
libdeflate-1.8-h2bbff1b_5.conda               46 KB
libffi-3.4.2-hd77b12b_6.conda                109 KB
libffi-3.4.4-hd77b12b_0.conda                113 KB
libpng-1.6.37-h2a8f88b_0.conda               333 KB
libpng-1.6.39-h8cc25b3_0.conda               369 KB
libtiff-4.2.0-he0120a3_1.conda               754 KB
libtiff-4.4.0-h8a3f274_2.conda               837 KB
libtiff-4.5.1-hd77b12b_0.conda               1.1 MB
libuv-1.40.0-he774522_0.conda                255 KB
libuv-1.44.2-h2bbff1b_0.conda                288 KB
libwebp-1.2.2-h2bbff1b_0.conda               658 KB
libwebp-1.2.4-h2bbff1b_0.conda                67 KB
libwebp-1.3.2-hbc33d0d_0.conda                73 KB
libwebp-base-1.2.4-h2bbff1b_0.conda          279 KB
libwebp-base-1.3.2-h2bbff1b_0.conda          306 KB
lz4-c-1.9.3-h2bbff1b_1.conda                 132 KB
lz4-c-1.9.4-h2bbff1b_0.conda                 143 KB
mkl-2021.4.0-haa95532_640.conda            114.9 MB
mkl-2023.1.0-h6b88ed4_46358.conda          155.9 MB
mkl-service-2.4.0-py310h2bbff1b_1.conda       44 KB
mkl-service-2.4.0-py38h2bbff1b_0.conda        51 KB
mkl_fft-1.3.1-py38h277e83a_0.conda           139 KB
mkl_fft-1.3.8-py310h2bbff1b_0.conda          170 KB
mkl_random-1.2.2-py38hf11a4ad_0.conda        225 KB
mkl_random-1.2.4-py310h59b6b97_0.conda       227 KB
numpy-1.22.3-py38h7a0a035_0.conda             25 KB
numpy-1.23.4-py38h3b20f71_0.conda             11 KB
numpy-1.26.3-py310h055cbcc_0.conda            11 KB
numpy-base-1.22.3-py38hca35cd5_0.conda       4.9 MB
numpy-base-1.23.4-py38h4da318b_0.conda       6.0 MB
numpy-base-1.26.3-py310h65a83cf_0.conda      6.2 MB
openjpeg-2.4.0-h4fc8c34_0.conda              219 KB
openssl-1.1.1o-h2bbff1b_0.conda              4.8 MB
openssl-1.1.1s-h2bbff1b_0.conda              5.5 MB
openssl-1.1.1w-h2bbff1b_0.conda              5.5 MB
pillow-10.0.1-py310h045eedc_0.conda          788 KB
pillow-9.0.1-py38hdc2b20a_0.conda            923 KB
pillow-9.2.0-py38hdc2b20a_1.conda            922 KB
pip-21.2.2-py36haa95532_0.conda              1.9 MB
pip-21.2.2-py38haa95532_0.conda              1.9 MB
pip-22.2.2-py38haa95532_0.conda              2.3 MB
pip-23.3.1-py310haa95532_0.conda             2.9 MB
pycparser-2.21-pyhd3eb1b0_0.conda             94 KB
pyopenssl-22.0.0-pyhd3eb1b0_0.conda           50 KB
pyopenssl-23.2.0-py310haa95532_0.conda        97 KB
pysocks-1.7.1-py310haa95532_0.conda           28 KB
pysocks-1.7.1-py38haa95532_0.conda            31 KB
python-3.10.0-h96c0403_3.tar.bz2            15.3 MB
python-3.6.13-h3758d61_0.conda              14.6 MB
python-3.8.13-h6244533_0.conda              16.5 MB
python-3.8.15-h6244533_2.conda              18.9 MB
pytorch-1.11.0-py3.8_cuda11.3_cudnn8_0.tar.bz2    1.23 GB
pytorch-1.12.1-py3.10_cuda11.3_cudnn8_0.tar.bz2    1.20 GB
pytorch-1.12.1-py3.8_cuda11.3_cudnn8_0.tar.bz2    1.19 GB
pytorch-mutex-1.0-cuda.tar.bz2                 3 KB
requests-2.27.1-pyhd3eb1b0_0.conda            54 KB
requests-2.28.1-py38haa95532_0.conda         100 KB
requests-2.31.0-py310haa95532_0.conda        100 KB
setuptools-58.0.4-py36haa95532_0.conda       776 KB
setuptools-61.2.0-py38haa95532_0.conda       1.0 MB
setuptools-65.5.0-py38haa95532_0.conda       1.1 MB
setuptools-68.2.2-py310haa95532_0.conda      942 KB
six-1.16.0-pyhd3eb1b0_1.conda                 18 KB
sqlite-3.38.3-h2bbff1b_0.conda               806 KB
sqlite-3.40.0-h2bbff1b_0.conda               891 KB
sqlite-3.41.2-h2bbff1b_0.conda               894 KB
tbb-2021.8.0-h59b6b97_0.conda                149 KB
tk-8.6.12-h2bbff1b_0.conda                   3.1 MB
torchaudio-0.12.1-py310_cu113.tar.bz2        3.7 MB
torchaudio-0.12.1-py38_cu113.tar.bz2         3.7 MB
torchvision-0.12.0-py38_cu113.tar.bz2        9.0 MB
torchvision-0.13.1-py310_cu113.tar.bz2       7.4 MB
torchvision-0.13.1-py38_cu113.tar.bz2        7.4 MB
typing_extensions-4.1.1-pyh06a4308_0.conda      28 KB
typing_extensions-4.3.0-py38haa95532_0.conda      42 KB
typing_extensions-4.9.0-py310haa95532_1.conda      55 KB
tzdata-2023d-h04d1e81_0.conda                117 KB
urllib3-1.26.12-py38haa95532_0.conda         185 KB
urllib3-1.26.18-py310haa95532_0.conda        200 KB
urllib3-1.26.9-py38haa95532_0.conda          187 KB
vc-14.2-h21ff451_1.conda                       8 KB
vs2015_runtime-14.27.29016-h5e58377_2.conda    1007 KB
wheel-0.37.1-pyhd3eb1b0_0.conda               33 KB
wheel-0.41.2-py310haa95532_0.conda           127 KB
wincertstore-0.2-py36h7fe50ca_0.conda         14 KB
wincertstore-0.2-py38haa95532_2.conda         15 KB
win_inet_pton-1.1.0-py310haa95532_0.conda       9 KB
win_inet_pton-1.1.0-py38haa95532_0.conda      35 KB
xz-5.2.5-h8cc25b3_1.conda                    246 KB
xz-5.2.6-h8cc25b3_0.conda                    240 KB
xz-5.4.5-h8cc25b3_0.conda                    593 KB
zlib-1.2.12-h8cc25b3_2.conda                 116 KB
zlib-1.2.13-h8cc25b3_0.conda                 113 KB
zstd-1.5.2-h19a0ad4_0.conda                  509 KB
zstd-1.5.5-hd43e919_0.conda                  682 KB---------------------------------------------------
Total:                                      4.59 GBProceed ([y]/n)?

这里可以清楚 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 installedusing symlinks back to the package cache.-t, --tarballs        Remove cached package tarballs.-f, --force-pkgs-dirsRemove *all* writable package caches. This option isnot included with the --all flag. WARNING: This willbreak environments with packages installed usingsymlinks back to the package cache.-c TEMPFILES [TEMPFILES ...], --tempfiles TEMPFILES [TEMPFILES ...]Remove temporary files that could not be deletedearlier due to being in-use. Argument is path(s) toprefix(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 condaprogrammatically.-q, --quiet           Do not display progress bar.-v, --verbose         Can be used multiple times. Once for INFO, twice forDEBUG, three times for TRACE.-y, --yes             Do not ask for confirmation.Examples:conda clean --tarballs

最后  pkgs的大小从13G--》8.5G

虽然搜身   但是还是很大

这篇关于Anaconda下的pkgs占用空间13G,如何安全的清理(已解决)的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/734816

相关文章

springboot3.4和mybatis plus的版本问题的解决

《springboot3.4和mybatisplus的版本问题的解决》本文主要介绍了springboot3.4和mybatisplus的版本问题的解决,主要由于SpringBoot3.4与MyBat... 报错1:spring-boot-starter/3.4.0/spring-boot-starter-

解决java.lang.NullPointerException问题(空指针异常)

《解决java.lang.NullPointerException问题(空指针异常)》本文详细介绍了Java中的NullPointerException异常及其常见原因,包括对象引用为null、数组元... 目录Java.lang.NullPointerException(空指针异常)NullPointer

Android开发中gradle下载缓慢的问题级解决方法

《Android开发中gradle下载缓慢的问题级解决方法》本文介绍了解决Android开发中Gradle下载缓慢问题的几种方法,本文给大家介绍的非常详细,感兴趣的朋友跟随小编一起看看吧... 目录一、网络环境优化二、Gradle版本与配置优化三、其他优化措施针对android开发中Gradle下载缓慢的问

python 3.8 的anaconda下载方法

《python3.8的anaconda下载方法》本文详细介绍了如何下载和安装带有Python3.8的Anaconda发行版,包括Anaconda简介、下载步骤、安装指南以及验证安装结果,此外,还介... 目录python3.8 版本的 Anaconda 下载与安装指南一、Anaconda 简介二、下载 An

python安装whl包并解决依赖关系的实现

《python安装whl包并解决依赖关系的实现》本文主要介绍了python安装whl包并解决依赖关系的实现,文中通过图文示例介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面... 目录一、什么是whl文件?二、我们为什么需要使用whl文件来安装python库?三、我们应该去哪儿下

MySQL安装时initializing database失败的问题解决

《MySQL安装时initializingdatabase失败的问题解决》本文主要介绍了MySQL安装时initializingdatabase失败的问题解决,文中通过图文介绍的非常详细,对大家的学... 目录问题页面:解决方法:问题页面:解决方法:1.勾选红框中的选项:2.将下图红框中全部改为英

Rust中的Drop特性之解读自动化资源清理的魔法

《Rust中的Drop特性之解读自动化资源清理的魔法》Rust通过Drop特性实现了自动清理机制,确保资源在对象超出作用域时自动释放,避免了手动管理资源时可能出现的内存泄漏或双重释放问题,智能指针如B... 目录自动清理机制:Rust 的析构函数提前释放资源:std::mem::drop android的妙

Nginx启动失败:端口80被占用问题的解决方案

《Nginx启动失败:端口80被占用问题的解决方案》在Linux服务器上部署Nginx时,可能会遇到Nginx启动失败的情况,尤其是错误提示bind()to0.0.0.0:80failed,这种问题通... 目录引言问题描述问题分析解决方案1. 检查占用端口 80 的进程使用 netstat 命令使用 ss

IDEA编译报错“java: 常量字符串过长”的原因及解决方法

《IDEA编译报错“java:常量字符串过长”的原因及解决方法》今天在开发过程中,由于尝试将一个文件的Base64字符串设置为常量,结果导致IDEA编译的时候出现了如下报错java:常量字符串过长,... 目录一、问题描述二、问题原因2.1 理论角度2.2 源码角度三、解决方案解决方案①:StringBui

mybatis和mybatis-plus设置值为null不起作用问题及解决

《mybatis和mybatis-plus设置值为null不起作用问题及解决》Mybatis-Plus的FieldStrategy主要用于控制新增、更新和查询时对空值的处理策略,通过配置不同的策略类型... 目录MyBATis-plusFieldStrategy作用FieldStrategy类型每种策略的作