0%

Ubuntu 删除多余内核

ubuntu删除多余内核

如果升级到了一个新的内核,并且还比较稳定,那么老的内核就可以清理了,放在电脑里也占位置。方法(命令行比较通用)如下:

1.查看系统内存在的内核版本列表:

1
sudo dpkgget-selections |grep linux

结果:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
libselinux1                              install

linux-firmware install

linux-generic install

linux-headers-3.2.0-33 install

linux-headers-3.2.0-33-generic install

linux-headers-3.2.0-33-generic-pae install

linux-headers-3.2.0-34 install

linux-headers-3.2.0-34-generic install

linux-headers-3.2.0-34-generic-pae install

linux-headers-3.2.0-35 install

linux-headers-3.2.0-35-generic install

linux-headers-3.2.0-35-generic-pae install

linux-headers-3.2.0-37 install

linux-headers-3.2.0-37-generic install

linux-headers-3.2.0-37-generic-pae install

linux-headers-3.2.0-38 install

linux-headers-3.2.0-38-generic install

linux-headers-3.2.0-38-generic-pae install

linux-headers-3.2.0-40 install

linux-headers-3.2.0-40-generic install

linux-headers-3.2.0-40-generic-pae install

linux-headers-generic install

linux-headers-generic-pae install

linux-image-2.6.32-21-generic deinstall

linux-image-2.6.32-40-generic deinstall

linux-image-2.6.32-41-generic deinstall

linux-image-2.6.32-42-generic install

linux-image-3.2.0-33-generic install

linux-image-3.2.0-34-generic install

linux-image-3.2.0-35-generic install

linux-image-3.2.0-37-generic install

linux-image-3.2.0-38-generic install

linux-image-3.2.0-40-generic install

linux-image-generic install

linux-libc-dev install

linux-sound-base install

pptp-linux install

syslinux install

syslinux-common install

syslinux-legacy install

util-linux install

2.查看当前Ubuntu系统使用的内核版本

1
uname -a

结果:

1
Linux linux 3.2.0-40-generic #64-Ubuntu SMP Mon Mar 25 21:22:26 UTC 2013 i686 i686 i386 GNU/Linux

3.删除多余内核:

1
2
3
sudo apt-get purge
linux-image-2.6.32-21-generic linux-image-2.6.32-40-generic linux-image-2.6.32-41-generic linux-image-2.6.32-42-generic linux-image-3.2.0-33-generic linux-image-3.2.0-34-generic linux-image-3.2.0-35-generic linux-image-3.2.0-37-generic linux-image-3.2.0-38-generic
linux-headers-3.2.0-33 linux-headers-3.2.0-34 linux-headers-3.2.0-35 linux-headers-3.2.0-37 linux-headers-3.2.0-38

更新grub:

1
sudo update-grub

再次查看一下内核列表,就发现旧版本已经不存在了!

处无为之事,行不言之教;作而弗始,生而弗有,为而弗恃,功成不居!

欢迎关注我的其它发布渠道