我正在使用 GCE 实例(操作系统:ubuntu)。我可以看到磁盘空间已满,大部分空间都被内核构建占用。实例有不同版本的内核构建。我不确定这些是如何生成的。
有人遇到过这个问题吗?有谁能帮我识别和修复这个问题吗?
以下是不同的版本,但它使用的是 3.19.0-66-generic #74~14.04.1-Ubuntu
root@bb-event-server-05:/lib/modules# ls -lrt
total 140
drwxr-xr-x 5 root root 4096 Mar 15 2016 3.19.0-56-generic
drwxr-xr-x 5 root root 4096 Apr 6 2016 3.16.0-69-generic
drwxr-xr-x 5 root root 4096 Apr 6 2016 3.19.0-58-generic
drwxr-xr-x 5 root root 4096 Apr 9 2016 3.16.0-70-generic
drwxr-xr-x 5 root root 4096 May 17 2016 3.16.0-71-generic
drwxr-xr-x 5 root root 4096 May 17 2016 3.19.0-59-generic
drwxr-xr-x 5 root root 4096 Jun 10 2016 3.16.0-73-generic
drwxr-xr-x 5 root root 4096 Jun 10 2016 3.19.0-61-generic
drwxr-xr-x 5 root root 4096 Jun 28 2016 3.16.0-76-generic
drwxr-xr-x 5 root root 4096 Jun 28 2016 3.19.0-64-generic
drwxr-xr-x 5 root root 4096 Jul 15 2016 3.16.0-77-generic
drwxr-xr-x 5 root root 4096 Jul 15 2016 3.19.0-65-generic
drwxr-xr-x 5 root root 4096 Aug 9 2016 3.19.0-66-generic
drwxr-xr-x 2 root root 4096 Sep 1 06:38 4.4.0-36-generic
drwxr-xr-x 5 root root 4096 Sep 1 06:39 3.19.0-68-generic
drwxr-xr-x 2 root root 4096 Sep 20 06:54 4.4.0-38-generic
drwxr-xr-x 5 root root 4096 Sep 20 06:55 3.19.0-69-generic
drwxr-xr-x 2 root root 4096 Oct 11 06:48 4.4.0-42-generic
drwxr-xr-x 5 root root 4096 Oct 11 06:50 3.19.0-71-generic
drwxr-xr-x 2 root root 4096 Oct 20 06:31 4.4.0-45-generic
drwxr-xr-x 5 root root 4096 Oct 20 06:33 3.19.0-73-generic
drwxr-xr-x 2 root root 4096 Nov 10 06:45 4.4.0-47-generic
drwxr-xr-x 5 root root 4096 Nov 10 06:46 3.19.0-74-generic
drwxr-xr-x 2 root root 4096 Nov 30 06:26 4.4.0-51-generic
drwxr-xr-x 5 root root 4096 Nov 30 06:27 3.19.0-75-generic
drwxr-xr-x 2 root root 4096 Dec 6 06:35 4.4.0-53-generic
drwxr-xr-x 5 root root 4096 Dec 6 06:37 3.19.0-77-generic
drwxr-xr-x 5 root root 4096 Dec 20 06:42 3.19.0-78-generic
drwxr-xr-x 2 root root 4096 Dec 21 06:51 4.4.0-57-generic
drwxr-xr-x 2 root root 4096 Jan 11 06:27 4.4.0-59-generic
drwxr-xr-x 5 root root 4096 Jan 11 06:28 3.19.0-79-generic
drwxr-xr-x 2 root root 4096 Feb 3 06:42 4.4.0-62-generic
drwxr-xr-x 5 root root 4096 Feb 3 06:43 3.19.0-80-generic
drwxr-xr-x 2 root root 4096 Feb 21 06:40 4.4.0-63-generic
drwxr-xr-x 2 root root 4096 Feb 22 06:49 4.4.0-64-generic
答案1
您可以尝试使用以下方法删除过时的依赖项apt-get autoremove --purge
答案2
Ubuntu 和 Debian 在运行升级后默认在运行系统上保留旧内核版本。
您可以通过运行 来找到内核包dpkg -l | grep linux-image
。然后您可以使用apt-get purge PACKAGE
从系统中删除该包。将 PACKAGE 替换为您从 获得的包名称(dpkg
当前正在运行的包除外)。