In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces "how to delete the old ubuntu kernel". In the daily operation, I believe many people have doubts about how to delete the old ubuntu kernel. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts about "how to delete the old ubuntu kernel". Next, please follow the editor to study!
First use uname-a to view the current kernel version:
The code is as follows:
Xzc@xzc-HP-ProBook-4446s:~$ uname-a
Linux xzc-HP-ProBook-4446s 3.13.0-46-generic # 77-Ubuntu SMP Mon Mar 2 18:23:39 UTC 2015 x86 "64 GNU/Linux
It can be seen that the current version is 3.13.0-46
Use dpkg-- get-selections | grep linux to take a look at the kernel version currently installed on the system:
The code is as follows:
Xzc@xzc-HP-ProBook-4446s:~$ dpkg-- get-selections | grep linux
Libselinux1:amd64 install
Linux-firmware install
Linux-generic install
Linux-headers-3.13.0-46 install
Linux-headers-3.13.0-46-generic install
Linux-headers-generic install
Linux-image-3.13.0-46-generic install
Linux-image-extra-3.13.0-44-generic deinstall
Linux-image-extra-3.13.0-46-generic install
Linux-image-generic install
Linux-libc-dev:amd64 install
Linux-signed-generic install
Linux-signed-image-3.13.0-44-generic deinstall
Linux-signed-image-3.13.0-46-generic install
Linux-signed-image-generic install
Linux-sound-base install
Pptp-linux install
Syslinux install
Syslinux-common install
Syslinux-legacy install
Util-linux install
The beginning of linux-headers, linux-image and linux-signed are all related to the kernel. Only those with a version number (such as linux-image-extra-3.13.0-44-generic) can be deleted. Be careful not to delete the currently used version. The following install indicates that it has been installed, and deinstall indicates that it has been installed and has now been deleted (does not take up space).
Sudo apt-get purge to delete
Sudo apt-get purge linux-image-extra-3.13.0-44-generic
Sudo apt-get purge linux-signed-image-3.13.0-44-generic
Sudo apt-get purge linux-headers-3.13.0-44 (this seems to automatically delete linux-headers-3.13.0-46-generic, if not, then sudo apt-get purge linux-headers-3.13.0-46-generic)
Be careful not to use sudo apt-get remove to delete, there will be linux-signed-image-3.13.0-44-generic deinstall. Of course, running purge at this time can also be deleted.
Update the startup menu using sudo update-grub
Some netizens have written a script with regular expressions, but have not tried how the script works:
The code is as follows:
Dpkg-l 'linux-*' | sed' / ^ II purge'"$(uname-r | sed" s /\ (. *\) -\ ([^ 0-9]\ +\) /\ 1 / ")" / d'mitt / ^ [^] * [^] *\ ([^] *\). * /\ 1bot / [0-9] /! D' | xargs sudo apt-get-y purge
At this point, the study on "how to delete the old kernel of ubuntu" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.