Linux
寫入文件時出錯:設備 manjaro 上沒有剩餘空間
我正在嘗試
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
有一些可用空間,但如何一勞永逸地避免這個錯誤。我知道我正在我的根目錄中下載一些應用程序。
儘管您為
/home
目錄分配了 350GB,但您的根目錄 ( ) 只有 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.