根文件系统磁盘空间不足错误 - ubuntu 20.04

根文件系统磁盘空间不足错误 - ubuntu 20.04

作为开发人员,我需要安装几个应用程序。但从未想过它会需要超过 15GB 的空间。我不断收到磁盘空间不足的警告,尝试了这里介绍的几种方法根驱动器的磁盘空间不足。如何释放空间? 我现在应该怎么做?

df-h给我这个

<pre>Filesystem      Size  Used Avail Use% Mounted on
udev            3.9G     0  3.9G   0% /dev
tmpfs           787M  2.3M  784M   1% /run
/dev/sda7        15G   13G  483M  97% /    <---------here is the problem
tmpfs           3.9G  309M  3.6G   8% /dev/shm
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           3.9G     0  3.9G   0% /sys/fs/cgroup
/dev/loop0      9.2M  9.2M     0 100% /snap/canonical-livepatch/95
/dev/loop1       98M   98M     0 100% /snap/core/9289
/dev/loop2       94M   94M     0 100% /snap/core/9066
/dev/loop3       55M   55M     0 100% /snap/core18/1705
/dev/loop4       55M   55M     0 100% /snap/core18/1754
/dev/loop5      161M  161M     0 100% /snap/gnome-3-28-1804/116
/dev/loop6      162M  162M     0 100% /snap/gnome-3-28-1804/128
/dev/loop7      256M  256M     0 100% /snap/gnome-3-34-1804/36
/dev/loop8      2.3M  2.3M     0 100% /snap/gnome-system-monitor/145
/dev/loop10     2.3M  2.3M     0 100% /snap/gnome-system-monitor/148
/dev/loop9      256M  256M     0 100% /snap/gnome-3-34-1804/33
/dev/loop11      55M   55M     0 100% /snap/gtk-common-themes/1502
/dev/loop12     164M  164M     0 100% /snap/spotify/41
/dev/loop13     291M  291M     0 100% /snap/vlc/1700
/dev/loop14     291M  291M     0 100% /snap/vlc/1620
/dev/loop15      63M   63M     0 100% /snap/gtk-common-themes/1506
/dev/sda1       256M   37M  220M  15% /boot/efi
/dev/sda9        45G   22G   21G  52% /home
tmpfs           787M   40K  787M   1% /run/user/1000</pre>

我系统中最大的文件大于 50mb

51.359 MB    libwebkit2gtk-4.0-37
53.826 MB    libreoffice-common
61.150 MB    libllvm6.0
61.758 MB    libllvm9
66.071 MB    libllvm9
66.081 MB    linux-modules-5.3.0-28-generic
66.244 MB    linux-modules-5.3.0-46-generic
66.371 MB    linux-modules-5.3.0-51-generic
67.433 MB    linux-headers-5.4.0-33
67.453 MB    linux-headers-5.4.0-37
69.052 MB    linux-modules-5.4.0-29-generic
69.060 MB    linux-modules-5.4.0-28-generic
69.602 MB    linux-modules-5.4.0-31-generic
69.602 MB    linux-modules-5.4.0-33-generic
69.637 MB    linux-modules-5.4.0-37-generic
70.296 MB    libllvm10
70.706 MB    libnvidia-gl-390
70.884 MB    yaru-theme-icon
71.276 MB    libnvidia-gl-390
80.368 MB    libnvidia-compute-390
81.794 MB    libnvidia-compute-390
87.731 MB    fonts-noto-cjk
87.940 MB    nodejs
99.738 MB    snapd
122.267 MB   libreoffice-core
147.893 MB   zoom
162.652 MB   openjdk-11-jre-headless
170.113 MB   thunderbird
170.316 MB   discord
172.541 MB   linux-modules-extra-5.3.0-28-generic
172.832 MB   linux-modules-extra-5.3.0-46-generic
172.877 MB   linux-modules-extra-5.3.0-51-generic
180.665 MB   linux-modules-extra-5.4.0-33-generic
180.667 MB   linux-modules-extra-5.4.0-31-generic
180.726 MB   linux-modules-extra-5.4.0-37-generic
181.130 MB   linux-modules-extra-5.4.0-29-generic
181.160 MB   linux-modules-extra-5.4.0-28-generic
195.652 MB   firefox
216.508 MB   locales-all
224.918 MB   google-chrome-stable
243.292 MB   brave-browser
252.870 MB   code
260.271 MB   libgl1-mesa-dri
279.021 MB   libgl1-mesa-dri
284.197 MB   skypeforlinux
314.970 MB   fonts-noto-extra
510.654 MB   linux-firmware

我的/opt文件大约有 1 GB,我的/usr大约有 5.8GB,我的 var 文件是/var4.2 GB

uname -r

5.4.0-37-generic

dpkg --list | grep linux-image给我吗:

ii  linux-image-5.4.0-37-generic               5.4.0-37.41                             amd64        Signed kernel image generic
ii  linux-image-generic                        5.4.0.37.40                             amd64        Generic Linux kernel image
ii  linux-image-unsigned-5.4.0-33-generic      5.4.0-33.37                             amd64        Linux kernel image for version 5.4.0 on 64 bit x86 SMP

我听了一些指南声称/最多只需要 15gb。现在我搞乱了。我的/home文件还有很多空间。

答案1

或许http://manpages.ubuntu.com/manpages/focal/man1/purge-old-kernels.1.html可以帮助您清理旧的内核模块并释放根文件系统上的磁盘空间。

但如果驱动器上有更多可用磁盘空间,请尝试扩大分区如何扩展我的根(/)分区?。也许您可以挤压其他分区。

相关内容