Software Updater - Boot Too Full

Asked by Jim

When I ran Software Updater, it said /boot didn't have enough room. I researched this extensively. I found a few complex solutions, including using Synaptic to delete files. The problem is, this is on my wife's computer, and I need a solution she can do. (Deleting files is a bad idea here, even with Synamtic.)

I tried:
sudo aptitude clean
sudo aptitude autoclean
sudo aptitude autoremove

And I checked the trash, which was empty. Also, there are very few data files on this computer yet.

It still didn't work.

My question is, why isn't there an option in the Software Udater, to delete the last few kernel images (with the users sudo password, of course), so any user could handle this problem?

Or, if that would lower security, how about a command, that is fairly simple, that could delete some of the old kernel images, some thing like:

   sudo deleteoldkernels 2

that would leave the last 2 kernels (including the current kernel image)?

This way it wouldn't require the user to know exactly which files, and which versions to delete (which is beyond many non-programmers/techs). If we are ever going to get Linux more mainstream, we have to make it user friendly for non-programmers and technicians.

Could someone here make this? (I'm not up to speed enough on Linux yet, to do this, or I would do it myself).

Thank you,
Jim

Question information

Language:
English Edit question
Status:
Expired
For:
Ubuntu update-manager Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Manfred Hampl (m-hampl) said :
#1

The command
sudo apt-get --purge autoremove
should (in sufficiently new Ubuntu releases) delete the obsolete versions of the kernel packages.

(Some versions of Ubuntu show Bug #1175637 and the command
apt-mark showmanual | grep linux-image | xargs sudo apt-mark markauto
has to be executed once to make the cleanup command correctly work.)

There are already some tools available,
e.g. the purge-old-kernels script in the bikeshed package ( https://launchpad.net/ubuntu/+source/bikeshed )
or the janitor function in Ubuntu-tweak (available in versions up to trusty, but working also on newer releases).

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#2

What is the output of:

uname -a; lsb_release -a; echo; dpkg -l | grep linux-image | grep -v extra | awk {'print $2'}

Thanks

Revision history for this message
Jim (mcginn) said :
#3

Sorry it took me a while to get back to this. Last time, I told it to ignore a file, thinking it would ask again when I ran the Software Updater, but it didn't. I suspect the Software Updater didn't complete the update, but thought it did.

The above messages helped me get this working, thank you! The rest of this message are the details, in case these can help you with developing the Software Updater.

Now that I have waited a while, I tried to use the Software Updater again, and it got stuck again.

As suggested above, I then tried: sudo apt-get --purge autoremove
but there still wasn't enough space in /boot.

To actionparsnip (andrew-woodhead666):
I then ran: uname -a; lsb_release -a; echo; dpkg -l | grep linux-image | grep -v extra | awk {'print $2'}
and it reported:
------------------------ Copy ------------------------
Linux peggy-ubuntu 3.13.0-57-lowlatency #95-Ubuntu SMP PREEMPT Fri Jun 19 09:45:24 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.2 LTS
Release: 14.04
Codename: trusty

linux-image-3.13.0-32-lowlatency
linux-image-3.13.0-44-lowlatency
linux-image-3.13.0-45-lowlatency
linux-image-3.13.0-46-lowlatency
linux-image-3.13.0-49-lowlatency
linux-image-3.13.0-52-lowlatency
linux-image-3.13.0-53-lowlatency
linux-image-3.13.0-57-lowlatency
linux-image-lowlatency
------------------------ End Copy ------------------------
File Manager says /boot has 40 items (214.0 MB), Free space: 10.0 MB.

I then ran (as Manfred Hampl (m-hampl)) suggested above:
apt-mark showmanual | grep linux-image | xargs sudo apt-mark markauto
and
sudo apt-get --purge autoremove
and it cleaned things up.

I then ran, again: uname -a; lsb_release -a; echo; dpkg -l | grep linux-image | grep -v extra | awk {'print $2'}
and it reported:
------------------------ Copy ------------------------
Linux peggy-ubuntu 3.13.0-57-lowlatency #95-Ubuntu SMP PREEMPT Fri Jun 19 09:45:24 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.2 LTS
Release: 14.04
Codename: trusty

linux-image-3.13.0-32-lowlatency
linux-image-3.13.0-53-lowlatency
linux-image-3.13.0-57-lowlatency
linux-image-lowlatency
------------------------ End Copy ------------------------
File Manager says /boot has 15 items (61.5 MB), Free space: 163.1 MB.

I see it removed the Gzip packages (and other related things), except for 3.13.0.57 and 53, which makes sense.

I then ran the Software Updater again, and it worked.

Thank you,
Jim

Revision history for this message
Jim (mcginn) said :
#4

Thank you for your help. This has allowed me to solve this problem for "myself" however the problem still remains for those who are not programmers or technicians. This problem still makes Linux so user UN-friendly to regular users, it stops them from using Linux (this may not be obvious to you if you have been programming for a long time, but I have extensive experience with regular users, training and helping them, and I can tell you they don't type any commands any more - they need a GUI).

It would be great if Linux was user friendly enough for regular users, that it could compete with Windows. I wish it was, but right now just isn't. But fixing this issue would be a big step toward that goal. So, I would really appreciate an answer to my initial question:

My question is, why isn't there an option in the Software Udater, to delete the last few kernel images (with the users sudo password, of course), so any user could handle this problem?

Could someone here make this? (I'm not up to speed enough on Linux yet, to do this, or I would do it myself).

If this isn't the best place for this suggestion for improving Linux, do you know of a better place to put this suggestion?

Thank you,
Jim

Revision history for this message
Launchpad Janitor (janitor) said :
#5

This question was expired because it remained in the 'Open' state without activity for the last 15 days.