我运行了命令:
dpkg -l | grep linux-image-
Run Code Online (Sandbox Code Playgroud)
并得到了这份清单
rc linux-image-3.13.0-51-generic 3.13.0-51.84
rc linux-image-3.13.0-52-generic 3.13.0-52.86 rc linux-image-3.13.0-53-generic 3.13.0-53.89
rc linux-image-3.13.0-54-generic 3.13.0-54.91
rc linux-image-3.13.0-55-generic 3.13.0-55.94 rc linux-image-3.13.0-57-generic 3.13.0-57.95 rc linux-image-3.13.0-58-generic 3.13.0-58.97
rc linux-image-3.13.0-59-generic 3.13.0-59.98
rc linux-image-3.13.0-61-generic 3.13.0-61.100
ii linux-image-3.13.0-62-generic 3.13.0-62.102
rc linux-image-extra-3.13.0-30-generic 3.13.0-30.55 rc linux-image-extra-3.13.0-46-generic 3.13.0-46.79
rc linux-image-extra-3.13.0-49-generic 3.13.0-49.83
rc linux-image-extra-3.13.0-51-generic 3.13.0-51.84
rc linux-image-extra-3.13.0-52-generic 3.13.0-52.86 rc linux-image-extra-3.13.0-53-generic 3.13.0-53.89
rc linux-image-extra-3.13.0-54-generic 3.13.0-54.91
rc linux-image-extra-3.13.0-55-generic 3.13.0-55.94
rc linux-image-extra-3.13.0-57-generic 3.13.0-57.95
rc linux-image-extra-3.13.0-58-generic 3.13.0-58.97
rc linux-image-extra-3.13.0-59-generic 3.13.0-59.98
rc linux-image-extra-3.13.0-61-generic 3.13.0-61.100
ii linux-image-extra-3.13.0-62-generic 3.13.0-62.102
ii linux-image-generic 3.13.0.62.69
Run Code Online (Sandbox Code Playgroud)
所以我然后跑了:
sudo apt-get autoremove linux-image-3.13.0-51-generic
Run Code Online (Sandbox Code Playgroud)
得到了这个:
Reading package lists... Done Building dependency tree
Reading state information... Done Package 'linux-image-3.13.0-51-generic' is not installed, so not removed 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Run Code Online (Sandbox Code Playgroud)
那么我的系统上是否有未使用的旧内核,我应该如何删除它们?
在生成的内核列表的前两列中,dpkg -l
您将找到有关软件包的信息,如下所示:
列(所需的操作):
u = Unknown
i = Install
h = Hold
r = Remove
p = Purge
Run Code Online (Sandbox Code Playgroud)栏(包裹状态):
n = Not-installed
c = Config-files
H = Half-installed
U = Unpacked
F = Half-configured
W = Triggers-awaiting
t = Triggers-pending
i = Installed
Run Code Online (Sandbox Code Playgroud)对于你的第一个例子
rc linux-image-3.13.0-51-generic 3.13.0-51.84
Run Code Online (Sandbox Code Playgroud)
因此,它会告诉我们软件包已被删除 ( r
) 但配置文件仍然存在 ( c
)。只有那些标记的内核ii
才实际安装在您的系统上。自动删除只会删除过时的内核,但会保留配置文件。
要删除它们,我们必须清除已安装的软件包 ( sudo apt-get purge <package>
),但保留它们并没有什么坏处,而且它们不需要太多的硬盘空间。
小智 -1
sudo apt-get autoremove linux-image-3.13.0-51-generic
过去我在以下方面取得了成功:
如果这不起作用,请尝试阅读这篇精彩的文章:
http://tuxtweaks.com/2010/10/remove-old-kernels-in-ubuntu-with-one-command/
归档时间: |
|
查看次数: |
1562 次 |
最近记录: |