Page 1 of 2 12 LastLast
Results 1 to 10 of 16

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

  1. #1
    Join Date
    Nov 2011
    Beans
    44

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

    Hey all,
    I'm going round in circles here. I can't update linux-image-5.4.0-64-generic from the Updates GUI. I don't get a helpful message, only 'cannot copy extracted data'. It turns out that /boot is close to being full. In previous updates when I ran into this I usually just:

    apt-get autoremove --purge to get rid of old kernels. However, this time around I get:

    $ Unmet dependencies. Try 'apt --fix-broken install'

    I do this, but as boot is full it fails as 'no space left on device'.

    Any suggestions of a way forward?

    Ta!

  2. #2
    Join Date
    May 2010
    Beans
    1,071

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

    What is the output of:
    Code:
    uname -a; lsb_release -a; dpkg -l | grep linux-image
    autoremove doesn't remove old kernels. It removes packages that have been orphaned during uninstalls. If the kernels are still on your system it won't uninstall them for you. That's not what that command does. Please read the apt man pages for more details.

  3. #3
    Join Date
    Nov 2011
    Beans
    44

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

    I was going by https://askubuntu.com/questions/1253...untu-20-04-lts but now I notice there are some comments about autoremove not working.

    Output is (and there are a lot of old kernels!)

    $ uname -a; lsb_release -a; dpkg -l | grep linux-image
    Linux fiftyacre-ThinkPad-X230 5.4.0-62-generic #70-Ubuntu SMP Tue Jan 12 12:45:47 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
    No LSB modules are available.
    Distributor ID: Ubuntu
    Description: Ubuntu 20.04.1 LTS
    Release: 20.04
    Codename: focal
    rc linux-image-4.15.0-101-generic 4.15.0-101.102 amd64 Signed kernel image generic
    rc linux-image-4.15.0-106-generic 4.15.0-106.107 amd64 Signed kernel image generic
    rc linux-image-4.15.0-108-generic 4.15.0-108.109 amd64 Signed kernel image generic
    rc linux-image-4.15.0-109-generic 4.15.0-109.110 amd64 Signed kernel image generic
    rc linux-image-4.15.0-111-generic 4.15.0-111.112 amd64 Signed kernel image generic
    rc linux-image-4.15.0-112-generic 4.15.0-112.113 amd64 Signed kernel image generic
    rc linux-image-4.15.0-115-generic 4.15.0-115.116 amd64 Signed kernel image generic
    rc linux-image-4.15.0-117-generic 4.15.0-117.118 amd64 Signed kernel image generic
    rc linux-image-4.15.0-118-generic 4.15.0-118.119 amd64 Signed kernel image generic
    rc linux-image-4.15.0-121-generic 4.15.0-121.123 amd64 Signed kernel image generic
    rc linux-image-4.15.0-20-generic 4.15.0-20.21 amd64 Signed kernel image generic
    rc linux-image-4.15.0-22-generic 4.15.0-22.24 amd64 Signed kernel image generic
    rc linux-image-4.15.0-23-generic 4.15.0-23.25 amd64 Signed kernel image generic
    rc linux-image-4.15.0-24-generic 4.15.0-24.26 amd64 Signed kernel image generic
    rc linux-image-4.15.0-29-generic 4.15.0-29.31 amd64 Signed kernel image generic
    rc linux-image-4.15.0-30-generic 4.15.0-30.32 amd64 Signed kernel image generic
    rc linux-image-4.15.0-33-generic 4.15.0-33.36 amd64 Signed kernel image generic
    rc linux-image-4.15.0-34-generic 4.15.0-34.37 amd64 Signed kernel image generic
    rc linux-image-4.15.0-36-generic 4.15.0-36.39 amd64 Signed kernel image generic
    rc linux-image-4.15.0-38-generic 4.15.0-38.41 amd64 Signed kernel image generic
    rc linux-image-4.15.0-39-generic 4.15.0-39.42 amd64 Signed kernel image generic
    rc linux-image-4.15.0-42-generic 4.15.0-42.45 amd64 Signed kernel image generic
    rc linux-image-4.15.0-43-generic 4.15.0-43.46 amd64 Signed kernel image generic
    rc linux-image-4.15.0-44-generic 4.15.0-44.47 amd64 Signed kernel image generic
    rc linux-image-4.15.0-45-generic 4.15.0-45.48 amd64 Signed kernel image generic
    rc linux-image-4.15.0-46-generic 4.15.0-46.49 amd64 Signed kernel image generic
    rc linux-image-4.15.0-47-generic 4.15.0-47.50 amd64 Signed kernel image generic
    rc linux-image-4.15.0-48-generic 4.15.0-48.51 amd64 Signed kernel image generic
    rc linux-image-4.15.0-50-generic 4.15.0-50.54 amd64 Signed kernel image generic
    rc linux-image-4.15.0-51-generic 4.15.0-51.55 amd64 Signed kernel image generic
    rc linux-image-4.15.0-52-generic 4.15.0-52.56 amd64 Signed kernel image generic
    rc linux-image-4.15.0-54-generic 4.15.0-54.58 amd64 Signed kernel image generic
    rc linux-image-4.15.0-55-generic 4.15.0-55.60 amd64 Signed kernel image generic
    rc linux-image-4.15.0-58-generic 4.15.0-58.64 amd64 Signed kernel image generic
    rc linux-image-4.15.0-60-generic 4.15.0-60.67 amd64 Signed kernel image generic
    rc linux-image-4.15.0-62-generic 4.15.0-62.69 amd64 Signed kernel image generic
    rc linux-image-4.15.0-64-generic 4.15.0-64.73 amd64 Signed kernel image generic
    rc linux-image-4.15.0-65-generic 4.15.0-65.74 amd64 Signed kernel image generic
    rc linux-image-4.15.0-66-generic 4.15.0-66.75 amd64 Signed kernel image generic
    rc linux-image-4.15.0-69-generic 4.15.0-69.78 amd64 Signed kernel image generic
    rc linux-image-4.15.0-70-generic 4.15.0-70.79 amd64 Signed kernel image generic
    rc linux-image-4.15.0-72-generic 4.15.0-72.81 amd64 Signed kernel image generic
    rc linux-image-4.15.0-74-generic 4.15.0-74.84 amd64 Signed kernel image generic
    rc linux-image-4.15.0-76-generic 4.15.0-76.86 amd64 Signed kernel image generic
    rc linux-image-4.15.0-88-generic 4.15.0-88.88 amd64 Signed kernel image generic
    rc linux-image-4.15.0-91-generic 4.15.0-91.92 amd64 Signed kernel image generic
    rc linux-image-4.15.0-96-generic 4.15.0-96.97 amd64 Signed kernel image generic
    rc linux-image-4.15.0-99-generic 4.15.0-99.100 amd64 Signed kernel image generic
    rc linux-image-5.4.0-51-generic 5.4.0-51.56 amd64 Signed kernel image generic
    ii linux-image-5.4.0-52-generic 5.4.0-52.57 amd64 Signed kernel image generic
    ii linux-image-5.4.0-53-generic 5.4.0-53.59 amd64 Signed kernel image generic
    ii linux-image-5.4.0-54-generic 5.4.0-54.60 amd64 Signed kernel image generic
    rc linux-image-5.4.0-56-generic 5.4.0-56.62 amd64 Signed kernel image generic
    ii linux-image-5.4.0-58-generic 5.4.0-58.64 amd64 Signed kernel image generic
    ii linux-image-5.4.0-59-generic 5.4.0-59.65 amd64 Signed kernel image generic
    ii linux-image-5.4.0-60-generic 5.4.0-60.67 amd64 Signed kernel image generic
    ii linux-image-5.4.0-62-generic 5.4.0-62.70 amd64 Signed kernel image generic
    iU linux-image-generic 5.4.0.64.67 amd64 Generic Linux kernel image

    Would apt-get --purge and then the kernel number work?


  4. #4
    Join Date
    May 2010
    Beans
    1,071

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

    OK, we can clean this up with:
    Code:
    sudo dpkg -P `dpkg -l grep linux-image | grep ^rc | awk {'print $2'}`
    Does that clear up /boot some? if not then run:
    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
    sudo apt-get --purge autoremove
    sudo apt-get clean

  5. #5
    Join Date
    Nov 2011
    Beans
    44

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

    Thanks for your help.

    The first option generates:

    dpkg:error: --purge needs at least one package name argument

    And the second option generates:

    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-ima
    ge-5.4.0-59-generic
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    You might want to run 'apt --fix-broken install' to correct these.
    The following packages have unmet dependencies.
    linux-image-generic : Depends: linux-image-5.4.0-64-generic but it is not going to be installed
    linux-modules-extra-5.4.0-52-generic : Depends: linux-image-5.4.0-52-generic but it is not going to be installed or
    linux-image-unsigned-5.4.0-52-generic but it is not going to be installed
    linux-modules-extra-5.4.0-53-generic : Depends: linux-image-5.4.0-53-generic but it is not going to be installed or
    linux-image-unsigned-5.4.0-53-generic but it is not going to be installed
    linux-modules-extra-5.4.0-54-generic : Depends: linux-image-5.4.0-54-generic but it is not going to be installed or
    linux-image-unsigned-5.4.0-54-generic but it is not going to be installed
    linux-modules-extra-5.4.0-58-generic : Depends: linux-image-5.4.0-58-generic but it is not going to be installed or
    linux-image-unsigned-5.4.0-58-generic but it is not going to be installed
    linux-modules-extra-5.4.0-59-generic : Depends: linux-image-5.4.0-59-generic but it is not going to be installed or
    linux-image-unsigned-5.4.0-59-generic but it is not going to be installed
    linux-modules-extra-5.4.0-64-generic : Depends: linux-image-5.4.0-64-generic but it is not going to be installed or
    linux-image-unsigned-5.4.0-64-generic but it is not going to be installed
    E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).




  6. #6
    Join Date
    May 2010
    Beans
    1,071

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

    Sorry, typo
    Code:
    sudo dpkg -P `dpkg -l | grep linux-image | grep ^rc | awk {'print $2'}`
    also please give the output of:
    Code:
    sudo apt --fix-broken install

  7. #7
    Join Date
    Nov 2011
    Beans
    44

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

    well that sure cleaned up a lot of kernels!

    Now $ uname -a; lsb_release -a; dpkg -l | grep linux-image gives:

    No LSB modules are available.
    Distributor ID: Ubuntu
    Description: Ubuntu 20.04.1 LTS
    Release: 20.04
    Codename: focal
    ii linux-image-5.4.0-52-generic 5.4.0-52.57 amd64 Signed kernel image generic
    ii linux-image-5.4.0-53-generic 5.4.0-53.59 amd64 Signed kernel image generic
    ii linux-image-5.4.0-54-generic 5.4.0-54.60 amd64 Signed kernel image generic
    ii linux-image-5.4.0-58-generic 5.4.0-58.64 amd64 Signed kernel image generic
    ii linux-image-5.4.0-59-generic 5.4.0-59.65 amd64 Signed kernel image generic
    ii linux-image-5.4.0-60-generic 5.4.0-60.67 amd64 Signed kernel image generic
    ii linux-image-5.4.0-62-generic 5.4.0-62.70 amd64 Signed kernel image generic
    iU linux-image-generic 5.4.0.64.67 amd64 Generic Linux kernel image

    and

    sudo apt --fix-broken install

    gives:

    Reading package lists... Done

    Building dependency tree
    Reading state information... Done

    Correcting dependencies... Done

    The following packages were automatically installed and are no longer required:

    adobe-flash-properties-gtk diffstat libcommon-sense-perl libevent-core-2.1-6 libgeos-3.6.2 libjson-xs-perl libllvm10 libtypes-serialiser-perl python-pypdf2 python3-defer python3-scour

    scour

    Use 'sudo apt autoremove' to remove them.

    The following additional packages will be installed:

    linux-image-5.4.0-64-generic linux-modules-5.4.0-64-generic

    Suggested packages:

    fdutils linux-doc | linux-source-5.4.0 linux-tools

    The following NEW packages will be installed

    linux-image-5.4.0-64-generic linux-modules-5.4.0-64-generic

    0 to upgrade, 2 to newly install, 0 to remove and 0 not to upgrade.

    39 not fully installed or removed.

    Need to get 0 B/23.4 MB of archives.

    After this operation, 85.1 MB of additional disk space will be used.

    Do you want to continue? [Y/n] Y

    (Reading database ... 506124 files and directories currently installed.)

    Preparing to unpack .../linux-modules-5.4.0-64-generic_5.4.0-64.72_amd64.deb ...

    Unpacking linux-modules-5.4.0-64-generic (5.4.0-64.72) ...

    dpkg: error processing archive /var/cache/apt/archives/linux-modules-5.4.0-64-generic_5.4.0-64.72_amd64.deb (--unpack):

    cannot copy extracted data for './boot/System.map-5.4.0-64-generic' to '/boot/System.map-5.4.0-64-generic.dpkg-new': failed to write (No space left on device)

    No apport report written because the error message indicates a disk full error

    dpkg-deb:error: paste subprocess was killed by signal (Broken pipe)

    Preparing to unpack .../linux-image-5.4.0-64-generic_5.4.0-64.72_amd64.deb ...

    Unpacking linux-image-5.4.0-64-generic (5.4.0-64.72) ...

    dpkg: error processing archive /var/cache/apt/archives/linux-image-5.4.0-64-generic_5.4.0-64.72_amd64.deb (--unpack):

    cannot copy extracted data for './boot/vmlinuz-5.4.0-64-generic' to '/boot/vmlinuz-5.4.0-64-generic.dpkg-new': failed to write (No space left on device)

    No apport report written because the error message indicates a disk full error

    dpkg-deb:error: paste subprocess was killed by signal (Broken pipe)

    Errors were encountered while processing:

    /var/cache/apt/archives/linux-modules-5.4.0-64-generic_5.4.0-64.72_amd64.deb

    /var/cache/apt/archives/linux-image-5.4.0-64-generic_5.4.0-64.72_amd64.deb

    E: Sub-process /usr/bin/dpkg returned an error code (1)



    I'm still getting a disk full error on /boot

    If I

    df -h

    I get
    /dev/sda1 704M 688M 0 100% /boot

    So despite the purge of kernels, /boot still reports as full (even after reboot). Odd!




  8. #8
    Join Date
    May 2010
    Beans
    1,071

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

    OK, we can kill more kernels with:
    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
    sudo apt-get --purge autoremove
    sudo apt-get clean
    If you run:
    Code:
    df -h | grep boot
    Is there space free now?

  9. #9
    Join Date
    Nov 2011
    Beans
    44

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

    Thanks for your continued help - much appreciated! This is where it gets infuriating....

    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-imag
    e-5.4.0-59-generic
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    You might want to run 'apt --fix-broken install' to correct these.
    The following packages have unmet dependencies.
    linux-image-generic : Depends: linux-image-5.4.0-64-generic but it is not going to be installed
    linux-modules-extra-5.4.0-52-generic : Depends: linux-image-5.4.0-52-generic but it is not going to be installed or
    linux-image-unsigned-5.4.0-52-generic but it is not going to be installed
    linux-modules-extra-5.4.0-53-generic : Depends: linux-image-5.4.0-53-generic but it is not going to be installed or
    linux-image-unsigned-5.4.0-53-generic but it is not going to be installed
    linux-modules-extra-5.4.0-54-generic : Depends: linux-image-5.4.0-54-generic but it is not going to be installed or
    linux-image-unsigned-5.4.0-54-generic but it is not going to be installed
    linux-modules-extra-5.4.0-58-generic : Depends: linux-image-5.4.0-58-generic but it is not going to be installed or
    linux-image-unsigned-5.4.0-58-generic but it is not going to be installed
    linux-modules-extra-5.4.0-59-generic : Depends: linux-image-5.4.0-59-generic but it is not going to be installed or
    linux-image-unsigned-5.4.0-59-generic but it is not going to be installed
    linux-modules-extra-5.4.0-64-generic : Depends: linux-image-5.4.0-64-generic but it is not going to be installed or
    linux-image-unsigned-5.4.0-64-generic but it is not going to be installed
    E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

    I'm back to the unmet dependencies when I try to purge!

  10. #10
    Join Date
    Nov 2008
    Location
    Metro Boston
    Beans
    15,540
    Distro
    Kubuntu 20.04 Focal Fossa

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

    Try running "sudo apt --fix-broken install" again.
    If you ask for help, do not abandon your request. Please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

Page 1 of 2 12 LastLast

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
  •