How to delete the old kernel of Ubuntu Linux

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.