How to delete the old kernel of the UbuntuLinux operating system

Source: Internet
Author: User
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.

  1. [Tc @ ibm: ~] $ Dpkg -- get-selections | grep linux
  2. Libselinux1 install
  3. Install linux-386
  4. Install linux-image-2.6.15-23-386
  5. Install linux-image-2.6.15-27-386
  6. Install linux-image-2.6.15-27-686
  7. Install linux-image-2.6.15-28-386
  8. Deinstall linux-image-2.6.15-28-686
  9. Install linux-image-386
  10. Linux-kernel-headers install
  11. Install linux-restricted-modules-2.6.15-23-386
  12. Install linux-restricted-modules-2.6.15-27-386
  13. Install linux-restricted-modules-2.6.15-27-686
  14. Install linux-restricted-modules-2.6.15-28-386
  15. Deinstall linux-restricted-modules-2.6.15-28-686
  16. Install linux-restricted-modules-386
  17. Linux-restricted-modules-common install
  18. Linux-sound-base install
  19. 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.

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.