vscode
我正在尝试在我的 manjaro 机器上更新。
我已经为主目录分配了 350GB,但是当我尝试vscode
使用 manjaro 提供的添加/删除软件进行更新时,它输出:
ERROR: Failed to extract code _x64_1.tar.gz
error writing to a file : no space left on the device manjaro
的输出df-h
:
Filesystem Size Used Avail Use% Mounted on
dev 3.9G 0 3.9G 0% /dev
run 3.9G 1.5M 3.9G 1% /run
/dev/sda6 30G 28G 0 100% /
tmpfs 3.9G 0 3.9G 0% /dev/shm
/dev/loop3 44M 44M 0 100% /var/lib/snapd/snap/snapd/14549
/dev/loop1 44M 44M 0 100% /var/lib/snapd/snap/snapd/14295
/dev/loop4 65M 65M 0 100% /var/lib/snapd/snap/sublime-text/110
/dev/loop2 62M 62M 0 100% /var/lib/snapd/snap/core20/1270
/dev/loop0 62M 62M 0 100% /var/lib/snapd/snap/core20/1328
/dev/loop5 65M 65M 0 100% /var/lib/snapd/snap/sublime-text/112
tmpfs 3.9G 60M 3.8G 2% /tmp
/dev/sda8 442G 75G 345G 18% /home
/dev/sda5 229M 167M 45M 79% /boot
tmpfs 786M 76K 786M 1% /run/user/1000
我有双重启动的 manjaro 和 windows 。
跑步后sudo pacman -Sc
,
更新的结果是:
Filesystem Size Used Avail Use% Mounted on
dev 3.9G 0 3.9G 0% /dev
run 3.9G 1.5M 3.9G 1% /run
/dev/sda6 30G 25G 3.4G 89% /
tmpfs 3.9G 0 3.9G 0% /dev/shm
/dev/loop3 44M 44M 0 100% /var/lib/snapd/snap/snapd/14549
/dev/loop1 44M 44M 0 100% /var/lib/snapd/snap/snapd/14295
/dev/loop4 65M 65M 0 100% /var/lib/snapd/snap/sublime-text/110
/dev/loop2 62M 62M 0 100% /var/lib/snapd/snap/core20/1270
/dev/loop0 62M 62M 0 100% /var/lib/snapd/snap/core20/1328
/dev/loop5 65M 65M 0 100% /var/lib/snapd/snap/sublime-text/112
tmpfs 3.9G 64M 3.8G 2% /tmp
/dev/sda8 442G 75G 345G 18% /home
/dev/sda5 229M 167M 45M 79% /boot
tmpfs 786M 76K 786M 1% /run/user/1000
该分区/dev/sda6
有一些可用空间,但如何一劳永逸地避免此错误。
我知道我正在根目录中下载一些应用程序。
答案1
尽管您为目录分配了 350GB /home
,但您的根目录 ( ) 却只有 30G,/
而且已经满了。您需要释放/
驱动器上的一些空间,这是发生此类操作的地方。此命令将显示最大的目录/
:
sudo du -xch --max-depth 2 / | awk '$1~/G/'
或者,您可以使用图形工具,例如baobab
.最有可能的罪魁祸首是 pacman 缓存/var/cache/pacman
和/var/log
.
第一步,您可以运行sudo pacman -Sc
以从缓存中删除不再安装的软件包。从man pacman
:
-c, --clean
Remove packages that are no longer installed from
the cache as well as currently unused sync databases
to free up disk space. When pacman downloads
packages, it saves them in a cache directory. In
addition, databases are saved for every sync DB you
download from and are not deleted even if they are
removed from the configuration file pacman.conf(5).
Use one --clean switch to only remove packages that
are no longer installed; use two to remove all files
from the cache. In both cases, you will have a yes
or no option to remove packages and/or unused
downloaded databases.