Page 2 of 2 FirstFirst 12
Results 11 to 16 of 16

Thread: /boot full but can't update due to broken package 20.04

  1. #11
    Join Date
    Jul 2005
    Location
    I think I'm here! Maybe?
    Beans
    Hidden!
    Distro
    Xubuntu 20.04 Focal Fossa

    Re: /boot full but can't update due to broken package 20.04

    So far nobody has asked why you have a separate /boot partition which is generally totally unnecessary unless you are using an encrypted system or LVM partitioning.

    That aside, you may find it easiest to use synaptic to remove some of the older kernels; it makes like a lot simpler when searching for all the packages associated with the kernel itself as you can search using just the version number, eg, 5.4.0-52 in the search box and then show all that's installed of that version by clicking on the first small column of the right hand pane (with an S in the header), to bring all those installed to the top of the list, as shown in my screenshot.
    It is then a few clicks to completely remove all of them.
    Note that my image is for a kernel version you are running at present so use only your own list of versions that you want removed.

    Try doing the same for all the old kernels you want to remove then you should be fine and able to add the 5.4.0-64 kernel that so far has not had space to be installed.

    In spite of what is said in post #2, sudo apt autoremove does often solve this problem and remove all but the last two kernel versions, and has done so now for a few years. However apt needs a lot of headroom to perform and with /boot too full that headroom was not available, hence your difficulty.

    I suggest in future that whenever a new kernel is available you install it and then immediately run sudo apt autoremove to make sure all older unwanted versions are removed.
    Attached Images Attached Images

  2. #12
    Join Date
    Nov 2011
    Beans
    44

    Re: /boot full but can't update due to broken package 20.04

    Thanks for your help everyone, I got there eventually. I ended up with a bit of a hybrid approach. I used part of the solution posted here:

    https://help.ubuntu.com/community/RemoveOldKernels

    It was because /boot was full. So what I did was:

    Code:
    sudo dpkg --purge linux-image-5.4.0-52-generic linux-image-extra-5.4.0-52-generic
    
    
    
    That got rid of the oldest kernel, then:

    Code:
    sudo apt-get --purge remove linux-image-5.4.0-52-generic linux-image-5.4.0-53-generic linux-image-5.4.0-54-generic linux-image-5.4.0-58-generic linux-image-5.4.0-59-generic
    
    
    
    Which worked without the dependency problem for some reason. Now /boot is half full and I'm on the latest kernel.

    Thanks for your suggestions.

  3. #13
    Join Date
    Jul 2005
    Location
    I think I'm here! Maybe?
    Beans
    Hidden!
    Distro
    Xubuntu 20.04 Focal Fossa

    Re: /boot full but can't update due to broken package 20.04

    So now is a very good time to run command
    Code:
    sudo apt autoremove --purge
    which will get rid of all the other related packages that are no longer needed, eg, the linux-header, linux-modules and linux-tools packages that you may have had installed.
    They may have automatically been removed when you uninstalled the kernels but it's worth running that command every so often anyway.

  4. #14
    Join Date
    Jun 2010
    Location
    London, England
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: /boot full but can't update due to broken package 20.04

    For information purposes: Software Updater installs kernels and marks them so that they can be removed by the autoremove command. In fact software Updater will automatically remove older kernels as it installs a newer kernel.

    Even when we use the terminal we get information about packages and kernels that are no longer required along with advice to run apt autoremove to get rid of them. Manually installed kernels do not get removed in the same way.

    Regards
    It is a machine. It is more stupid than we are. It will not stop us from doing stupid things.
    Ubuntu user #33,200. Linux user #530,530


  5. #15
    Join Date
    May 2010
    Beans
    1,071

    Re: /boot full but can't update due to broken package 20.04

    https://askubuntu.com/questions/6202...ernels-to-keep

    Explains how autoremove does and doesn't remove old kernels. I personally prefer to manually keep on top of this manually. I've made scripts to check there aren't lots of kernels on my systems too. Having a small /boot really doesn't do any favours and storage isn't a massive premium as in the early days of Linux.

  6. #16
    Join Date
    Nov 2011
    Beans
    44

    Re: /boot full but can't update due to broken package 20.04

    I don't know if
    sudo apt autoremove --purge

    will remove kernels that have been manually updated.

    If I use
    Code:
    apt-mark showmanual 'linux-image-.*'


    I get

    linux-image-5.4.0-60-generic

    while with
    Code:
    apt-mark showauto 'linux-image-.*' 


    I get

    linux-image-5.4.0-62-generic
    linux-image-5.4.0-64-generic
    linux-image-generic

    I don't know if autoremove will remove the manually updated kernels or not.


    Last edited by Deanobats; January 27th, 2021 at 12:41 PM.

Page 2 of 2 FirstFirst 12

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •