Ubuntu软件包管理空间不足,在/var/cache/apt/archive

Ubuntu中安装软件时,提示:

E: You don't have enough free space in /var/cache/apt/archives/.

在/var/cache/apt/archives/中没有足够的可用空间。

Ubuntu软件包管理空间不足,在/var/cache/apt/archives/中

/var/cache/apt/archives文件夹中的文件是使用sudo apt-get install appname时下载的安装文件,这些文件是可以清理的,若你系统空间不足的时候,可以想到从此处进行清理而获得空间。在我电脑下的文件有,如下:

linuxidc@ubuntu:~/linuxidc.com$ cd /var/cache/apt/archives
linuxidc@ubuntu:/var/cache/apt/archives$ ls
kicad-doc-en_5.0.0-rc1-201802261039+1352~17~ubuntu18.04.1_all.deb
kicad-footprints_5.0.2-stable-201812071423+5bf695a~9~ubuntu18.04.1_all.deb
kicad-libraries_5.0.2-stable-201812071405+7~ubuntu18.04.1_all.deb
kicad-packages3d_5.0.2-stable-201812071618+c24f4c5~7~ubuntu18.04.1_all.deb
kicad-symbols_5.0.2-stable-201812071435+84cd7f9~6~ubuntu18.04.1_all.deb
kicad-templates_5.0.2-stable-201812071430+31b13f2~8~ubuntu18.04.1_all.deb
libcurl4_7.58.0-2ubuntu3.6_amd64.deb
libfreeimage3_3.17.0+ds1-5build2_amd64.deb
libgl2ps1.4_1.4.0+dfsg1-1_amd64.deb
libglew2.0_2.0.0-5_amd64.deb
libjxr0_1.1-6build1_amd64.deb
libngspice-kicad_0.1-2~201810171224+2e5be8d~ubuntu18.04.1_amd64.deb
liboce-foundation11_0.18.2-2build1_amd64.deb
liboce-modeling11_0.18.2-2build1_amd64.deb
liboce-ocaf11_0.18.2-2build1_amd64.deb
liboce-ocaf-lite11_0.18.2-2build1_amd64.deb
liboce-visualization11_0.18.2-2build1_amd64.deb
libwxbase3.0-0v5_3.0.4+dfsg-3_amd64.deb
libwxgtk3.0-0v5_3.0.4+dfsg-3_amd64.deb
libwxgtk3.0-gtk3-0v5_3.0.4+dfsg-3_amd64.deb
lock
partial
Python-wxgtk3.0_3.0.2.0+dfsg-7_amd64.deb
python-wxversion_3.0.2.0+dfsg-7_all.deb
xsltproc_1.1.29-5_amd64.deb

Ubuntu软件包管理空间不足,在/var/cache/apt/archives/中

清理的方法很简单:

linuxidc@ubuntu:/var/cache/apt/archives$ sudo apt-get clean
[sudo] password for linuxidc:

再次查看的时候,*.deb文件都不存在了

linuxidc@ubuntu:/var/cache/apt/archives$ ls
lock  partial

Ubuntu软件包管理空间不足,在/var/cache/apt/archives/中

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/12218.html