Home PC Games Linux Windows Database Network Programming Server Mobile  
  Home \ Linux \ Remove old kernel on Ubuntu     - Quick paging ROW_NUMBER conducted (Database)

- Compare Several MySQL environmental issues (Database)

- On FreeBSD 10.2 Bugzilla how to install and configure Apache SSL (Server)

- Build your own Python coding environment (Linux)

- Ubuntu 14.04 LTS 64-bit installation and activation Sublime Text 3 can not solve the Chinese input method to solve the problem (Linux)

- E: Sub-process / usr / bin / dpkg returned an error code (1) error solution (Linux)

- How to release the cache memory on Linux (Linux)

- Vagrant Getting Start (Linux)

- Setting Hibernate connection MySQL database connection pool coding (Database)

- Ubuntu 14.04 / 13.10 users how to install Ubuntu Touch core applications (Linux)

- Use FirewallD build dynamic firewall (Linux)

- Linux character device - automatically creates the device nodes and devices (Linux)

- Oracle SDE and maintain common commands - Display space (Database)

- Github Getting Started Basic Course (Linux)

- Source MongoDB 3.2.1 installed on CentOS6.5 (Database)

- CentOS 7 How to install MySQL Server (Database)

- How to modify the Linux NIC eth1 to eth0 (Linux)

- DBCA Error: ORA-19809: limit exceeded for recovery files process (Database)

- Classical sorting algorithm - Selection Sort (Linux)

- Linux iptables: Composition Rules (Linux)

  Remove old kernel on Ubuntu
  Add Date : 2016-04-26      
  Question: In the past I've upgraded a couple of kernels on my Ubuntu. Now I want to delete these old kernel image to save my disk space. How to use the easiest way to remove the previous version of the kernel on Ubuntu?

On Ubuntu, there are several ways to upgrade the kernel. In the Ubuntu Desktop, the software update allows you to check and update to the latest kernel on a daily basis. On the Ubuntu server, one of the most important security updates is unattended-upgrades package will automatically update the kernel. However, you can also manually using apt-get or aptitude commands to update.

Over time, sustained kernel update will accumulate a large number of cores in the system no longer in use, waste your disk space. Each module kernel image and its associated / header files can take up 200-400MB disk space, and therefore no longer in use by the kernel and wasted disk space will rapidly increase.

GRUB manager for each old kernel maintains a GRUB entry, in case you want to use them.

As part of a disk cleanup, if you do not use them, you can consider clean out these images.

How to clean up the old kernel image

Before deleting old kernel, remember to leave two best recent kernel (the latest and previous versions), to prevent major releases error. Now let us look at how to clean up the old kernel in Ubuntu.

In Ubuntu kernel image contains the following packages.

linux-image-: the kernel image
linux-image-extra-: additional kernel modules
linux-headers-: kernel headers
First check the kernel image installed on your system.

$ Dpkg --list | grep linux-image
$ Dpkg --list | grep linux-headers
Listed in the kernel image, you can remove a specific version (eg 3.19.0-15).

$ Sudoapt-get purge linux-image-3.19.0-15
$ Sudoapt-get purge linux-headers-3.19.0-15
The above command will delete the kernel image and its associated kernel modules and header files.

Note that if you have not upgraded the kernel then delete the old kernel will automatically trigger install the new kernel. So after deleting the old kernel, GRUB configuration will be automatically upgraded to remove the GRUB menu relevant GRUB entry.

If you have a lot of useless kernel, you can use the shell expression once delete multiple cores. Note that this bracket expression is valid only in bash or compatible shell.

$ Sudoapt-get purge linux-image-3.19.0- {18,20,21,25}
$ Sudoapt-get purge linux-headers-3.19.0- {18,20,21,25}

The above command will remove four kernel image: 3.19.0-18,3.19.0-20,3.19.0-21 and 3.19.0-25.

If for any reason GRUB configuration after deleting the old kernel does not have the right to upgrade, you can try to manually update the configuration with update-grub2 command.

$ Sudo update-grub2
Now restart to verify that GRUB menu has been properly cleaned up.
- Convert MySQL date string to a NULL value exception handling (Database)
- When the master key encounter NULL (Database)
- AngularJS - Getting Started with Routing (Programming)
- Linux iptables firewall settings whitelist (RHEL 6 and CentOS 7) (Linux)
- Teach you to diagnose problems with strace (Linux)
- How to update the ISPConfig 3 SSL Certificates (Server)
- Linux environment MySQL master-slave synchronization (Database)
- ORA-30926 and MERGE tables empty the temporary occupation problem (Database)
- Getting Started with Linux system to learn: How do I know which processes are running on the CPU core (Linux)
- Java logging performance of those things (Programming)
- Django url () function Detailed (Programming)
- Linux script commands - terminal recorder (Linux)
- C ++ based socket communication TCP and UDP (Programming)
- VNC configuration detailed analysis under Linux (Linux)
- Easily solve the MySQL database connection error too many (Database)
- Oracle archive log full cause abnormal slow database performance (Database)
- Thunderbird 24.4.2 has been released for use with PPA updates (Linux)
- Adding SSH to Github (Linux)
- Atheros AR8161 / AR8162 network card driver problem solving in CentOS 6.4 (Linux)
- ethtool implementation framework and application in Linux (Linux)
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.