After using Ubuntu for a while, you will find that many kernels have been installed in the system due to automatic upgrades. for example, I have installed so many of the following, which leads to a long startup list, you must delete unnecessary items.
After using Ubuntu for a while, you will find that many kernels have been installed in the system due to automatic upgrades. for example, I have installed so many of the following, which 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 file contains an image. select the package to be uninstalled and use apt-get to uninstall it.
- [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 as follows:$ 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. Its format is like this:
2.6.20-16-generic
Open system, system management, new software manager, click search on the toolbar, and enter linux-image-2 in the displayed dialog box ".
In the search result list, you should be able to find the installed Kernels. now you can compare the results displayed in the terminal and select the kernels of other installed versions, 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 Ubuntu fails, it will crash.
Click the Apply button to complete the operation. when you start up next time, you will find that all the extra kernel options in the GRUB directory are missing.