The Cookie Machine - Click here to drag window

DUMMY TEXT - Real text set in assets/js/theCookieMachine.js

If you can read me, I'm broken!

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.

⇧ Ubuntu doesn't reboot Move slow `udev-configure-printer` from systemd boot to after login prompt  β‡©