Solve the problem of insufficient space in Ubuntu 16.04 for boot partition
- 2020-05-27 07:54:53
- OfStack
preface
Because linux kernel 1 is being updated, the old kernel is no longer in use after the update, but the old kernel files are still in boot, occupying space. After several updates, the boot partition will be full, indicating that boot disk space is insufficient.
The solution
Delete unused kernel files to free up space.
Complete the following steps
1. View the installed kernel
dpkg --get-selections |grep linux-image
eason@eason:~$ dpkg --get-selections |grep linux-image
linux-image-4.4.0-21-generic deinstall
linux-image-4.4.0-57-generic install
linux-image-4.4.0-59-generic install
linux-image-4.4.0-62-generic install
linux-image-4.4.0-64-generic install
linux-image-extra-4.4.0-21-generic deinstall
linux-image-extra-4.4.0-57-generic install
linux-image-extra-4.4.0-59-generic install
linux-image-extra-4.4.0-62-generic install
linux-image-extra-4.4.0-64-generic install
linux-image-extra-virtual install
linux-image-generic install
eason@eason:~$
followed
deinstall
Is the deleted kernel and can be ignored
2. Use
uname -a
See which kernel you are currently starting
eason@eason:~$ uname -a
Linux eason 4.4.0-62-generic #83-Ubuntu SMP Wed Jan 18 14:10:15 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
The output shows that the kernel we are currently booting is
4.4.0-62-generic
3. Run
apt-get remove
The uninstall command unloads the other kernels, and to be on the safe side, keep the last two versions of 1.
sudo apt-get remove linux-image-4.4.0-57-generic
sudo apt-get remove linux-image-4.4.0-59-generic
sudo apt-get remove linux-image-extra-4.4.0-57-generic
sudo apt-get remove linux-image-extra-4.4.0-59-generic
If the prompt has not uninstalled clean can be executed
sudo apt-get remove
To uninstall.
conclusion
The above is the whole content of this article, I hope the content of this article to your study or work can bring 1 definite help, if you have questions you can leave a message to communicate.