删除根分区中的“核心转储”文件夹/文件以释放空间

删除根分区中的“核心转储”文件夹/文件以释放空间

在尝试升级系统时,我不断收到一条消息,提示我需要释放根分区中的空间。情况如下:

Filesystem      Size  Used Avail Use% Mounted on
/dev/sda5        20G   16G  3.1G  84% /

对我来说,这似乎占用了很多空间,我不知道是什么。在这个问题,一个答案建议OP(除其他事项外)搜索填满磁盘的核心转储

find / -xdev -name core -ls -o -path "/lib*" -prune

我进行了搜索并得出以下结果。删除这些文件夹以获得一些额外空间是否安全?也许仅从这个输出无法判断……

538670    4 drwxr-xr-x   3 root     root         4096 Mar 29 17:14 /usr/share/maven-repo/org/eclipse/jdt/core
 19809    4 drwxr-xr-x   2 root     root         4096 Jan 18 16:07 /usr/share/mlt/core
1201400    4 drwxr-xr-x  11 root     root         4096 Jul 25  2014 /usr/share/kivy-examples/tutorials/pong/.buildozer/android/platform/python-for-android/dist/myapp/python-install/lib/python2.7/site-packages/kivy/core
1204401    4 drwxr-xr-x  11 root     root         4096 Jul 25  2014 /usr/share/kivy-examples/tutorials/pong/.buildozer/android/platform/python-for-android/dist/myapp/private/lib/python2.7/site-packages/kivy/core
181735    4 drwxr-sr-x   2 root     staff        4096 Jul 20  2015 /usr/local/lib/python2.7/dist-packages/astroid/tests/testdata/python3/data/unicode_package/core
181828    4 drwxr-sr-x   2 root     staff        4096 Jul 20  2015 /usr/local/lib/python2.7/dist-packages/astroid/tests/testdata/python2/data/unicode_package/core
992785    4 drwxr-sr-x  10 root     staff        4096 Oct 23  2014 /usr/local/lib/python2.7/dist-packages/django/core
195891    4 drwxr-sr-x  11 root     staff        4096 Feb 28 15:48 /usr/local/lib/python2.7/dist-packages/kivy/core
343499    4 drwxr-sr-x   2 root     staff        4096 Sep 23  2015 /usr/local/lib/python2.7/dist-packages/pandas/core
179564    4 drwxr-sr-x   5 root     staff        4096 Jun 17  2015 /usr/local/lib/python2.7/dist-packages/numpy/core
220980    4 drwxr-sr-x   5 root     staff        4096 Jan 18 13:02 /usr/local/lib/python2.7/dist-packages/IPython/core
147573    4 drwxr-xr-x  12 root     root         4096 Jun 12  2015 /usr/lib/python3/dist-packages/kivy/core
 73494    4 drwxr-xr-x   6 root     root         4096 Jan 18 16:33 /usr/lib/python3/dist-packages/numpy/core
  8054    4 drwxr-xr-x   4 root     root         4096 Jan 18 16:33 /usr/lib/python3/dist-packages/IPython/core
173879    4 drwxr-xr-x   4 root     root         4096 Jan 18 16:30 /usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx/lib/pubsub/core
147017    4 drwxr-xr-x   4 root     root         4096 Jan 18 16:24 /usr/lib/python2.7/dist-packages/wx-3.0-gtk2/wx/lib/pubsub/core
556686    4 drwxr-xr-x  11 root     root         4096 Jun 12  2015 /usr/lib/python2.7/dist-packages/kivy/core
179822    4 drwxr-xr-x   5 root     root         4096 Jan 18 16:29 /usr/lib/python2.7/dist-packages/numpy/core
935953    4 drwxr-xr-x   3 root     root         4096 Jan 18 16:28 /usr/lib/python2.7/dist-packages/IPython/core
832349    4 drwxr-xr-x   3 root     root         4096 Apr 28 15:41 /usr/lib/jvm/java-8-oracle/lib/visualvm/visualvm/core
832360    4 drwxr-xr-x   3 root     root         4096 Apr 28 15:41 /usr/lib/jvm/java-8-oracle/lib/visualvm/platform/core
 98278    4 drwxr-xr-x   3 root     root         4096 Mar 30 05:01 /usr/lib/vmware-installer/2.1.0/vmis/core
198496    4 drwxr-xr-x   2 root     root         4096 Apr  5 14:16 /usr/src/linux-headers-4.2.0-35-generic/include/config/mlx5/core
197817    4 drwxr-xr-x   2 root     root         4096 Apr  5 14:16 /usr/src/linux-headers-4.2.0-35-generic/include/config/serial/core
204636    4 drwxr-xr-x   3 root     root         4096 Apr  5 14:16 /usr/src/linux-headers-4.2.0-35-generic/include/config/core
196798    4 drwxr-xr-x   2 root     root         4096 Apr  5 14:16 /usr/src/linux-headers-4.2.0-35/drivers/memstick/core
197048    4 drwxr-xr-x   2 root     root         4096 Apr  5 14:16 /usr/src/linux-headers-4.2.0-35/drivers/usb/core
196392    4 drwxr-xr-x   2 root     root         4096 Apr  5 14:16 /usr/src/linux-headers-4.2.0-35/drivers/net/ethernet/mellanox/mlx5/core
196980    4 drwxr-xr-x   2 root     root         4096 Apr  5 14:16 /usr/src/linux-headers-4.2.0-35/drivers/video/fbdev/core
196604    4 drwxr-xr-x   2 root     root         4096 Apr  5 14:16 /usr/src/linux-headers-4.2.0-35/drivers/gpu/drm/nouveau/nvkm/core
196550    4 drwxr-xr-x   2 root     root         4096 Apr  5 14:16 /usr/src/linux-headers-4.2.0-35/drivers/mmc/core
196203    4 drwxr-xr-x   2 root     root         4096 Apr  5 14:16 /usr/src/linux-headers-4.2.0-35/drivers/infiniband/core
107599    4 drwxr-xr-x   2 root     root         4096 Apr  5 14:16 /usr/src/linux-headers-4.2.0-35/net/core
107625    4 drwxr-xr-x   2 root     root         4096 Apr  5 14:16 /usr/src/linux-headers-4.2.0-35/sound/aoa/core
107795    4 drwxr-xr-x   4 root     root         4096 Apr  5 14:16 /usr/src/linux-headers-4.2.0-35/sound/core
784287 29524 -rw-------   1 root     root     38842368 Jan 31  2015 /etc/X11/core

答案1

老实说,我不会从您发布的输出中列出的任何目录中删除任何内容,但也许我只是过于谨慎了。

我强烈建议您尝试以下方法,而不是自己到处删除东西(这样做可能会很危险):漂白剂,可直接从 进行安装apt-get。您还可以从他们的网站

我以前在不知何故出现大量垃圾的系统上使用过它,它确实有效。但是,我发现 Linux 系统通常不会出现大量需要清理的额外文件,除非用户明确下载/存储了某些内容。

答案2

增加系统分区而不是删除可能导致系统崩溃的未知文件怎么样?如果硬盘上有未分配空间等可用空间,请尝试将其合并到磁盘管理中的系统分区。如果其他分区中有可用空间,请缩小其中一个分区并将冗余空间添加到系统分区。

相关内容