After using Ubuntu for a while, you will find that many kernels are installed in the system due to automatic upgrades. As I have installed so many of the following, this leads to a long startup list. You must delete unnecessary items.
First, use the following command to list all installed kernels. In the following table, the kernel files with images are used. Select the package to be uninstalled and use apt-get to uninstall the package.
[Tc @ ibm: ~] $ Dpkg -- get-selections | grep linux
Libselinux1 install
Install linux-386
Install linux-image-2.6.15-23-386
Install linux-image-2.6.15-27-386
Install linux-image-2.6.15-27-686
Install linux-image-2.6.15-28-386
Deinstall linux-image-2.6.15-28-686
Install linux-image-386
Linux-kernel-headers install
Install linux-restricted-modules-2.6.15-23-386
Install linux-restricted-modules-2.6.15-27-386
Install linux-restricted-modules-2.6.15-27-686
Install linux-restricted-modules-2.6.15-28-386
Deinstall linux-restricted-modules-2.6.15-28-686
Install linux-restricted-modules-386
Linux-restricted-modules-common install
Linux-sound-base install
Util-linux install
The specific uninstall method is
$ Sudo apt-get remove linux-image-2.6.15-23-386
In this way, the kernel files can be automatically deleted and the disk space can be released.
In addition, you need to record a command.
Uname-r
You will get the Linux kernel version currently in use. This version must be retained and cannot be deleted. The format is like this:
2.6.20-16-generic
Open system, system management, and new software manager ". Click the search button on the toolbar and enter linux-image-2 in the pop-up dialog box ".
In the search result list, you should be able to find the installed kernels. Now you can compare the result displayed on the terminal, select the kernel of another version that has been installed, and click "mark to delete ".
Note! Be careful not to select the kernel version you are using or the software packages that are not "linux-image. If you choose the one you shouldn't, Ubuntu will be suspended if it doesn't work well.
Click Apply) to complete the operation. When you start the system next time, you will find that the redundant kernel options in the GRUB directory are missing.