# VPS提示
# 示例还是显示文章以前的旧版本号,不用在意。
[email protected]:~# apt-get purge linux-image-3.16.0-4-amd64
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
libuuid-perl linux-base
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
linux-image-3.16.0-4-amd64* linux-image-amd64*
0 upgraded, 0 newly installed, 2 to remove and 7 not upgraded.
After this operation, 164 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 31152 files and directories currently installed.)
Removing linux-image-3.16.0-4-amd64 (3.16.36-1+deb8u2) ...
Ok, proceeding with removing running kernel image.
/etc/kernel/postrm.d/initramfs-tools:
update-initramfs: Deleting /boot/initrd.img-3.16.0-4-amd64
/etc/kernel/postrm.d/zz-update-grub:
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.10.1-040900rc8-generic
Found initrd image: /boot/initrd.img-4.10.1-040900rc8-generic
done
The link /vmlinuz.old is a damaged link
Removing symbolic link vmlinuz.old
You may need to re-run your boot loader
The link /initrd.img.old is a damaged link
Removing symbolic link initrd.img.old
You may need to re-run your boot loader
Purging configuration files for linux-image-3.16.0-4-amd64 (3.16.36-1+deb8u2) ...
# ================================================
[email protected]:~# apt-get purge linux-image-amd64
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
libuuid-perl linux-base
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
linux-image-amd64*
0 upgraded, 0 newly installed, 1 to remove and 7 not upgraded.
After this operation, 164 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 31152 files and directories currently installed.)
Removing linux-image-amd64 (3.16.36-1+deb8u2) ...
Ok, proceeding with removing running kernel image.
/etc/kernel/postrm.d/initramfs-tools:
update-initramfs: Deleting /boot/initrd.img-amd64
/etc/kernel/postrm.d/zz-update-grub:
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.10.1-040900rc8-generic
Found initrd image: /boot/initrd.img-4.10.1-040900rc8-generic
done
The link /vmlinuz.old is a damaged link
Removing symbolic link vmlinuz.old
You may need to re-run your boot loader
The link /initrd.img.old is a damaged link
Removing symbolic link initrd.img.old
You may need to re-run your boot loader
Purging configuration files for linux-image-amd64 (3.16.36-1+deb8u2) ...
# ================================================
# 最后在看一下内核是否只剩下教程安装的内核。
[email protected]:~# dpkg -l|grep linux-image | awk '{print $2}'
linux-image-4.10.1-040900-generic