Views:
1,108β
Votes: 1β
β
Solution
Tags:
kernel
dpkg
Link:
π See Original Answer on Ask Ubuntu β§ π
URL:
https://askubuntu.com/q/941360
Title:
Need to free up space in boot for update, but can't purge kernels due to unmet dependencies
ID:
/2017/07/30/Need-to-free-up-space-in-boot-for-update_-but-can_t-purge-kernels-due-to-unmet-dependencies
Created:
July 30, 2017
Edited: June 12, 2020
Upload:
September 15, 2024
Layout: post
TOC:
false
Navigation: false
Copy to clipboard: false
Why do I have to install something when I want to delete images?
You donβt have to install something. It wonβt let you delete the images unless you delete the ones that depend on them at the same time. For example you need to use:
$ sudo apt-get purge linux-headers-4.4.33-040433* linux-headers-4.4.33-040433-generic* linux-image-4.4.33-040433-generic*
The following packages will be REMOVED:
linux-headers-4.4.33-040433* linux-headers-4.4.33-040433-generic*
linux-image-4.4.33-040433-generic*
To avoid this manual work try my bash script which automates the process. Yes it may be a shameless plug but I spent many hours in development and fine-tuning so would like to see as many use it as possible.
Do I also have to delete the files with linux-headers-* and linux-signed-image-*?
Yes as answered in the previous section.
Shouldnβt Ubuntu handle the deletion of not needed kernels automatically or what is the reason I have to do it manually?
Ubuntu does remove kernels automatically that it installed automatically when you use:
sudo apt-get autoremove
If you manually installed a kernel using a technique like this: How do I update kernel to the latest mainline version? then you have to manually remove the kernel as well.
I have to encrypt my hard drive. Could this be the reason?
No. But I wouldnβt encrypt my hard drive.