61 GB 根分割區已滿?

61 GB 根分割區已滿?

我有一個 61 GB 的 Ubuntu 19.04 根分割區,已滿。使用 Baobab 進行查看,設備和位置面板顯示: 1.5GB 可用 61.5 GB 總計 單擊它,Baobab 顯示僅使用 15.2GB 的圓圈。

  1. 為什麼兩個數字之間會有這種差異?
  2. 根怎麼能這麼大? (我清理並自動刪除它)
  3. 有沒有辦法壓縮它?

根分區大小

df -h Filesystem Size Used Avail Use% Mounted on udev 7.7G 0 7.7G 0% /dev tmpfs 1.6G 2.2M 1.6G 1% /run /dev/nvme0n1p3 58G 56G 447M 100% / tmpfs 7.8G 335M 7.4G 5% /dev/shm tmpfs 5.0M 4.0K 5.0M 1% /run/lock tmpfs 7.8G 0 7.8G 0% /sys/fs/cgroup /dev/loop1 142M 142M 0 100% /snap/skype/60 /dev/loop2 89M 89M 0 100% /snap/core/6964 /dev/loop3 90M 90M 0 100% /snap/core/6673 /dev/loop4 148M 148M 0 100% /snap/skype/66 /dev/loop5 54M 54M 0 100% /snap/core18/970 /dev/loop6 212M 212M 0 100% /snap/firefox/226 /dev/loop7 152M 152M 0 100% /snap/gnome-3-28-1804/51 /dev/loop8 175M 175M 0 100% /snap/spotify/32 /dev/loop10 125M 125M 0 100% /snap/code/8 /dev/loop0 174M 174M 0 100% /snap/spotify/34 /dev/loop12 54M 54M 0 100% /snap/core18/782 /dev/loop11 90M 90M 0 100% /snap/core/6818 /dev/loop13 145M 145M 0 100% /snap/skype/63 /dev/loop15 54M 54M 0 100% /snap/core18/941 /dev/loop14 212M 212M 0 100% /snap/firefox/216 /dev/loop16 35M 35M 0 100% /snap/gtk-common-themes/818 /dev/loop19 181M 181M 0 100% /snap/spotify/35 /dev/loop20 8.2M 8.2M 0 100% /snap/evince/68 /dev/loop22 125M 125M 0 100% /snap/code/9 /dev/loop21 36M 36M 0 100% /snap/gtk-common-themes/1198 /dev/loop23 88M 88M 0 100% /snap/meshlab-mardy/5 /dev/loop24 35M 35M 0 100% /snap/gtk-common-themes/1122 /dev/nvme0n1p2 511M 7.7M 504M 2% /boot/efi /dev/nvme0n1p4 412G 155G 257G 38% /home tmpfs 1.6G 76K 1.6G 1% /run/user/1000 /dev/loop25 8.2M 8.2M 0 100% /snap/evince/95 /dev/loop26 152M 152M 0 100% /snap/gnome-3-28-1804/55

sudo du -hx --max-depth=1 / 2> /dev/null 66M /boot 17M /etc 0 /media 4.6G /var 17M /bin 805M /lib 4.0K /lib64 0 /mnt 1.9G /opt 39M /root 12M /sbin 80K /snap 0 /srv 29M /tmp 7.1G /usr 0 /cdrom 0 /.config 15G /

sudo du -sh /root/.[A-z]* /root/* du: cannot access '/root/.[A-z]': No such file or directory du: cannot access '/root/': No such file or directory

只是在這裡複製一個很長列表的末尾: sudo du -ckmax / | sort -nk 1,1 | tee ~/output 137 /usr/local/lib/python2.7/dist-packages 141 /var/lib/snapd/cache/ea230569aca785460ef3c852ba6991a714794797d20db58b83e82c2d9ea7adad43eaeae93269a39302c69c81cd0c5c6e 142 /var/lib/snapd/snaps/skype_60.snap 143 /usr/lib/jvm/java-11-openjdk-amd64/jmods/java.base.jmod 143 /var/cache 145 /var/lib/snapd/snaps/skype_63.snap 148 /var/lib/snapd/snaps/skype_66.snap 151 /usr/share/texlive/texmf-dist/tex 152 /var/lib/snapd/snaps/gnome-3-28-1804_51.snap 152 /var/lib/snapd/snaps/gnome-3-28-1804_55.snap 154 /usr/lib/gcc 154 /usr/lib/gcc/x86_64-linux-gnu 155 /usr/lib/python2.7 157 /usr/lib/thunderbird 157 /usr/local 162 /usr/lib/chromium-browser/chromium-browser 167 /lib/modules/5.0.0-15-generic/kernel/drivers 174 /var/lib/snapd/snaps/spotify_34.snap 175 /var/lib/snapd/snaps/spotify_32.snap 178 /usr/lib/jvm/java-11-openjdk-amd64/lib 178 /var/lib/apt 178 /var/lib/apt/lists 181 /var/lib/snapd/snaps/spotify_35.snap 193 /usr/share/locale 200 /usr/share/doc/texlive-doc 205 /opt/libreoffice6.0/share 206 /usr/lib/i386-linux-gnu/wine 207 /usr/lib/jvm/java-11-openjdk-amd64/jmods 207 /usr/share/fonts 212 /var/lib/snapd/snaps/firefox_216.snap 212 /var/lib/snapd/snaps/firefox_226.snap 219 /usr/lib/x86_64-linux-gnu/wine 223 /usr/lib/chromium-browser 232 /lib/modules/5.0.0-15-generic/kernel 235 /opt/libreoffice6.2/share 238 /lib/modules/5.0.0-15-generic 261 /opt/mendeleydesktop/lib/qt 264 /usr/share/icons 284 /opt/mendeleydesktop/lib 286 /usr/share/texlive/texmf-dist 288 /usr/share/texlive 318 /lib/modules 350 /opt/mendeleydesktop 357 /opt/libreoffice6.0/program 363 /opt/libreoffice6.2/program 386 /usr/lib/jvm 386 /usr/lib/jvm/java-11-openjdk-amd64 406 /usr/bin 406 /usr/lib/i386-linux-gnu 411 /usr/share/doc 430 /lib/firmware 554 /var/lib/snapd/cache 566 /opt/libreoffice6.0 621 /opt/libreoffice6.2 667 /usr/share/tesseract-ocr 667 /usr/share/tesseract-ocr/4.00 667 /usr/share/tesseract-ocr/4.00/tessdata 800 /var/log/journal 800 /var/log/journal/8c65d4da432b4013bf2f5e080b2544f4 805 /lib 844 /var/log 1575 /usr/lib/x86_64-linux-gnu 1887 /opt 2572 /var/lib/snapd/snaps 2947 /usr/share 3128 /var/lib/snapd 3498 /var/lib 3510 /usr/lib 4612 /var 7187 /usr 14667 / 14667 total

答案1

試著sudo du -ckmax / | sort -nk 1,1 | tee ~/output找出是什麼佔據了空間。

或者,您可能有一些已開啟的檔案句柄來刪除佔用大量空間的檔案。嘗試執行此命令以查看是否隱藏了任何大的內容:

sudo lsof | grep -i deleted

如果有一些大的已刪除檔案具有開啟的檔案句柄,請終止具有檔案句柄的進程以釋放空間。您也可以重新啟動來清除它。

相關內容