首頁 > 軟體

Ubuntu軟體包管理空間不足,在/var/cache/apt/archives/中

2020-06-16 16:39:25

Ubuntu中安裝軟體時,提示:

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

在/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

清理的方法很簡單:

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

再次檢視的時候,*.deb檔案都不存在了

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


IT145.com E-mail:sddin#qq.com