網頁

2014年11月16日 星期日

Ubuntu/Lubuntu --- How to free up /boot space

Today when I launch the software Updater and install the updated software on Lubuntu, the alert message tell me “Not enough free disk space” on disk /boot.ScreenHunter_410Even though I follow the suggestion to empty the trash an remove temporary packages by using the sudo apt-get clean command, the updated software still cannot be installed.

Thank friendly author to share the related knowledge on the Internet. Based on Google Search, I find out some information for me to resolve this problem. That is :
If the /boot partition size is full and the reason is the existing old kernel, maybe we will clean the old kernel images.
ScreenHunter_409
How to clear these old kernel images?
At first, we need to realize what the current kernel version is used by using the uname -r command.ScreenHunter_411next to list all the old kernels that we ever have installed it by using the dpkg -l linux-{image,headers}-"[0-9]*" | awk '/^ii/{ print $2}' | grep -v -e `uname -r | cut -f1,2 -d"-"` | grep -e '[0-9]' commandScreenHunter_412So do that we will know what version will be removed because the current kernel is not on these list.
Then we will begin to uninstall and delete these old kernel by using the dpkg -l linux-{image,headers}-"[0-9]*" | awk '/^ii/{ print $2}' | grep -v -e `uname -r | cut -f1,2 -d"-"` | grep -e '[0-9]' | xargs sudo apt-get -y purge commandScreenHunter_414After do it, the /boot space will be free up now.ScreenHunter_415
Since 2010 Design by Davidwa
©Copyright Davidwa Inc. All rights reserved.