Page 1 of 3 123 LastLast
Results 1 to 10 of 26

Thread: Unable to clean/clear old kernels from /boot...

  1. #1
    Join Date
    Oct 2010
    Beans
    19

    Question Unable to clean/clear old kernels from /boot...

    I was following this thread to clear a full /boot partition. I'm at the part where I'm trying to:

    Code:
    sudo apt-get purge linux-image-x.x.x.x-generic
    Then I was planning to:

    Code:
    sudo update-initramfs -u                          # remakes boot ramdisk
    sudo update-grub2                                 # re-creates boot menu
    Unfortunately I'm unable to purge:

    Code:
    root@ubuntu:~$ sudo apt-get purge linux-image-4.4.0-62-generic
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    You might want to run 'apt-get -f install' to correct these:
    The following packages have unmet dependencies:
     linux-image-generic : Depends: linux-image-4.4.0-164-generic but it is not going to be installed or
                                    linux-image-unsigned-4.4.0-164-generic but it is not going to be installed
                           Recommends: thermald but it is not going to be installed
     linux-modules-extra-4.4.0-150-generic : Depends: linux-image-4.4.0-150-generic but it is not going to be installed or
                                                      linux-image-unsigned-4.4.0-150-generic but it is not going to be installed
     linux-modules-extra-4.4.0-151-generic : Depends: linux-image-4.4.0-151-generic but it is not going to be installed or
                                                      linux-image-unsigned-4.4.0-151-generic but it is not going to be installed
     linux-modules-extra-4.4.0-164-generic : Depends: linux-image-4.4.0-164-generic but it is not going to be installed or
                                                      linux-image-unsigned-4.4.0-164-generic but it is not going to be installed
    E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
    Of course apt-get -f install returns the full /boot disk error.

    Not sure where to go from here, I know I just have a lot of old images to manually delete.

    Help?

    Thanks for any advice!

  2. #2
    Join Date
    Aug 2016
    Location
    Wandering
    Beans
    Hidden!
    Distro
    Xubuntu Development Release

    Re: Unable to clean/clear old kernels from /boot...

    What does this report:
    Code:
    sudo apt autoremove
    With realization of one's own potential and self-confidence in one's ability, one can build a better world.
    Dalai Lama>>
    Code Tags

  3. #3
    Join Date
    Apr 2011
    Location
    Mystletainn Kick!
    Beans
    10,453
    Distro
    Ubuntu

    Re: Unable to clean/clear old kernels from /boot...

    What do
    Code:
    ls /boot
    df -hT -x squashfs
    show?
    Splat Double Splat Triple Splat
    Earn Your Keep
    Don't mind me, I'm only passing through.
    Once in a blue moon, I'm actually helpful
    .

  4. #4
    Join Date
    Oct 2010
    Beans
    19

    Re: Unable to clean/clear old kernels from /boot...

    ~$ sudo apt autoremove
    [sudo] password for user:
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    You might want to run 'apt-get -f install' to correct these.
    The following packages have unmet dependencies:
    linux-image-generic : Depends: linux-image-4.4.0-164-generic but it is not installed or
    linux-image-unsigned-4.4.0-164-generic but it is not installed
    Recommends: thermald but it is not installed
    linux-modules-extra-4.4.0-150-generic : Depends: linux-image-4.4.0-150-generic but it is not installed or
    linux-image-unsigned-4.4.0-150-generic but it is not installed
    linux-modules-extra-4.4.0-151-generic : Depends: linux-image-4.4.0-151-generic but it is not installed or
    linux-image-unsigned-4.4.0-151-generic but it is not installed
    linux-modules-extra-4.4.0-164-generic : Depends: linux-image-4.4.0-164-generic but it is not installed or
    linux-image-unsigned-4.4.0-164-generic but it is not installed
    E: Unmet dependencies. Try using -f.
    Last edited by armegeden; 3 Weeks Ago at 07:55 PM.

  5. #5
    Join Date
    Oct 2010
    Beans
    19

    Re: Unable to clean/clear old kernels from /boot...

    Quote Originally Posted by deadflowr View Post
    What do
    Code:
    ls /boot
    df -hT -x squashfs
    show?
    here's the ls /boot:

    Code:
    ~$ ls /boot
    abi-4.4.0-130-generic     config-4.4.0-134-generic  config-4.4.0-148-generic      initrd.img-4.4.0-142-generic  retpoline-4.4.0-139-generic   System.map-4.4.0-141-generic  vmlinuz-4.4.0-138-generic
    abi-4.4.0-134-generic     config-4.4.0-137-generic  grub                          initrd.img-4.4.0-143-generic  retpoline-4.4.0-141-generic   System.map-4.4.0-142-generic  vmlinuz-4.4.0-139-generic
    abi-4.4.0-137-generic     config-4.4.0-138-generic  initrd.img-4.4.0-130-generic  initrd.img-4.4.0-145-generic  retpoline-4.4.0-142-generic   System.map-4.4.0-143-generic  vmlinuz-4.4.0-141-generic
    abi-4.4.0-138-generic     config-4.4.0-139-generic  initrd.img-4.4.0-134-generic  lost+found                    System.map-4.4.0-130-generic  System.map-4.4.0-145-generic  vmlinuz-4.4.0-142-generic
    abi-4.4.0-139-generic     config-4.4.0-141-generic  initrd.img-4.4.0-137-generic  retpoline-4.4.0-130-generic   System.map-4.4.0-134-generic  System.map-4.4.0-148-generic  vmlinuz-4.4.0-143-generic
    abi-4.4.0-141-generic     config-4.4.0-142-generic  initrd.img-4.4.0-138-generic  retpoline-4.4.0-134-generic   System.map-4.4.0-137-generic  vmlinuz-4.4.0-130-generic     vmlinuz-4.4.0-145-generic
    abi-4.4.0-142-generic     config-4.4.0-143-generic  initrd.img-4.4.0-139-generic  retpoline-4.4.0-137-generic   System.map-4.4.0-138-generic  vmlinuz-4.4.0-134-generic     vmlinuz-4.4.0-148-generic
    config-4.4.0-130-generic  config-4.4.0-145-generic  initrd.img-4.4.0-141-generic  retpoline-4.4.0-138-generic   System.map-4.4.0-139-generic  vmlinuz-4.4.0-137-generic
    and the other:

    Code:
    :~$ df -hT -x squashfs
    Filesystem                    Type      Size  Used Avail Use% Mounted on
    udev                          devtmpfs  2.0G     0  2.0G   0% /dev
    tmpfs                         tmpfs     396M  6.3M  389M   2% /run
    /dev/mapper/vali--vg-root ext4       90G   45G   41G  53% /
    tmpfs                         tmpfs     2.0G  8.0K  2.0G   1% /dev/shm
    tmpfs                         tmpfs     5.0M     0  5.0M   0% /run/lock
    tmpfs                         tmpfs     2.0G     0  2.0G   0% /sys/fs/cgroup
    /dev/sda1                     ext2      472M  469M     0 100% /boot
    //172.16.0.6/m         cifs      4.3T  2.8T  1.5T  66% /mnt/Media
    tmpfs                         tmpfs     396M     0  396M   0% /run/user/1000

  6. #6
    Join Date
    Aug 2016
    Location
    Wandering
    Beans
    Hidden!
    Distro
    Xubuntu Development Release

    Re: Unable to clean/clear old kernels from /boot...

    One more Please:
    Code:
    sudo apt -f install
    With realization of one's own potential and self-confidence in one's ability, one can build a better world.
    Dalai Lama>>
    Code Tags

  7. #7
    Join Date
    Apr 2011
    Location
    Mystletainn Kick!
    Beans
    10,453
    Distro
    Ubuntu

    Re: Unable to clean/clear old kernels from /boot...

    Might require some finessing.
    One method is

    1) Remove all files related to one of those kernels in the /boot directory
    Something like
    Code:
    sudo rm *-4.4.0-130-generic
    this frees some room.

    2) Next remove one or two kernels manually
    Code:
    sudo apt purge linux-image-4.4.0-134-generic linux-image-4.4.0-137-generic
    That'll free even more room.

    3) Next reinstall the files for that first kernel manually removed
    Code:
    sudo apt install --reinstall linux-image-4.4.0-130-generic
    You reinstall that kernel image so the package management doesn't freak out.

    4)
    Code:
    sudo apt autoremove --purge


    Scratch that.
    Looking at the boot folder output some stuff seems off.
    Newer kernels are missing files in the listed output
    What does
    Code:
    dpkg -l | grep linux-image
    show?
    Best to see how broken things already are before moving forward.
    Splat Double Splat Triple Splat
    Earn Your Keep
    Don't mind me, I'm only passing through.
    Once in a blue moon, I'm actually helpful
    .

  8. #8
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: Unable to clean/clear old kernels from /boot...

    Ouch. You are stuck. This problem has been there, 2-3 week, at least. Like a leaky roof, out of storage errors while patching don't get better over time.

    There are some things I'd try, but I have excellent backups, so I can put things back easily. If you are willing to go to extreme measures, let me know. Be certain you have everything you want to keep backed up. It would entail moving some files to make room, but create empty files in /boot/ so APT doesn't know any better. Then do the sudo apt-get -f install to get out of APT hell. Then come back and use some aggressive apt-get purge package globbing to remove all but 3 kernels. And lastly, run an autoremove. If all that works, you can wipe the kernel files that were copied somewhere else. Only move the kernel files that won't be used, for any needed reboots.

    Next time around, run sudo apt autoremove every 2 weeks or so. This will clean up all but 2-3 kernels. Under 200MB should be needed in /boot/.

  9. #9
    Join Date
    Oct 2010
    Beans
    19

    Re: Unable to clean/clear old kernels from /boot...

    Quote Originally Posted by 1fallen View Post
    One more Please:
    Code:
    sudo apt -f install
    Sorry, this is long output:

    Code:
    ~$ sudo apt -f install
    [sudo] password for user:
    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:
      linux-headers-4.4.0-150 linux-headers-4.4.0-150-generic linux-headers-4.4.0-151 linux-headers-4.4.0-151-generic linux-image-4.4.0-130-generic linux-image-4.4.0-134-generic linux-image-4.4.0-137-generic
      linux-image-4.4.0-138-generic linux-image-4.4.0-139-generic linux-image-4.4.0-141-generic linux-image-4.4.0-142-generic linux-image-4.4.0-143-generic linux-image-4.4.0-150-generic linux-image-4.4.0-151-generic
      linux-image-extra-4.4.0-130-generic linux-image-extra-4.4.0-134-generic linux-image-extra-4.4.0-137-generic linux-image-extra-4.4.0-138-generic linux-image-extra-4.4.0-139-generic
      linux-image-extra-4.4.0-141-generic linux-image-extra-4.4.0-142-generic linux-modules-4.4.0-143-generic linux-modules-4.4.0-150-generic linux-modules-4.4.0-151-generic linux-modules-extra-4.4.0-143-generic
      linux-modules-extra-4.4.0-150-generic linux-modules-extra-4.4.0-151-generic
    Use 'sudo apt autoremove' to remove them.
    The following additional packages will be installed:
      linux-image-4.4.0-150-generic linux-image-4.4.0-151-generic linux-image-4.4.0-164-generic linux-modules-4.4.0-150-generic linux-modules-4.4.0-151-generic linux-modules-4.4.0-164-generic
    Suggested packages:
      fdutils linux-doc-4.4.0 | linux-source-4.4.0 linux-tools
    The following NEW packages will be installed:
      linux-image-4.4.0-150-generic linux-image-4.4.0-151-generic linux-image-4.4.0-164-generic linux-modules-4.4.0-150-generic linux-modules-4.4.0-151-generic linux-modules-4.4.0-164-generic
    0 upgraded, 6 newly installed, 0 to remove and 178 not upgraded.
    16 not fully installed or removed.
    Need to get 56.7 MB of archives.
    After this operation, 201 MB of additional disk space will be used.
    Do you want to continue? [Y/n] Y
    Get:1 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 linux-modules-4.4.0-164-generic amd64 4.4.0-164.192 [11.9 MB]
    Get:2 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 linux-image-4.4.0-164-generic amd64 4.4.0-164.192 [6,935 kB]
    Get:3 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 linux-modules-4.4.0-150-generic amd64 4.4.0-150.176 [12.0 MB]
    Get:4 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 linux-image-4.4.0-150-generic amd64 4.4.0-150.176 [6,928 kB]
    Get:5 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 linux-modules-4.4.0-151-generic amd64 4.4.0-151.178 [12.0 MB]
    Get:6 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 linux-image-4.4.0-151-generic amd64 4.4.0-151.178 [6,928 kB]
    Fetched 56.7 MB in 8s (7,002 kB/s)
    (Reading database ... 213410 files and directories currently installed.)
    Preparing to unpack .../linux-modules-4.4.0-164-generic_4.4.0-164.192_amd64.deb ...
    Unpacking linux-modules-4.4.0-164-generic (4.4.0-164.192) ...
    dpkg: error processing archive /var/cache/apt/archives/linux-modules-4.4.0-164-generic_4.4.0-164.192_amd64.deb (--unpack):
     cannot copy extracted data for './boot/System.map-4.4.0-164-generic' to '/boot/System.map-4.4.0-164-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: subprocess paste was killed by signal (Broken pipe)
    Preparing to unpack .../linux-image-4.4.0-164-generic_4.4.0-164.192_amd64.deb ...
    Unpacking linux-image-4.4.0-164-generic (4.4.0-164.192) ...
    dpkg: error processing archive /var/cache/apt/archives/linux-image-4.4.0-164-generic_4.4.0-164.192_amd64.deb (--unpack):
     cannot copy extracted data for './boot/vmlinuz-4.4.0-164-generic' to '/boot/vmlinuz-4.4.0-164-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: subprocess paste was killed by signal (Broken pipe)
    Preparing to unpack .../linux-modules-4.4.0-150-generic_4.4.0-150.176_amd64.deb ...
    Unpacking linux-modules-4.4.0-150-generic (4.4.0-150.176) ...
    dpkg: error processing archive /var/cache/apt/archives/linux-modules-4.4.0-150-generic_4.4.0-150.176_amd64.deb (--unpack):
     cannot copy extracted data for './boot/System.map-4.4.0-150-generic' to '/boot/System.map-4.4.0-150-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: subprocess paste was killed by signal (Broken pipe)
    Preparing to unpack .../linux-image-4.4.0-150-generic_4.4.0-150.176_amd64.deb ...
    Unpacking linux-image-4.4.0-150-generic (4.4.0-150.176) ...
    dpkg: error processing archive /var/cache/apt/archives/linux-image-4.4.0-150-generic_4.4.0-150.176_amd64.deb (--unpack):
     cannot copy extracted data for './boot/vmlinuz-4.4.0-150-generic' to '/boot/vmlinuz-4.4.0-150-generic.dpkg-new': failed to write (No space left on device)
    No apport report written because MaxReports is reached already
                                                                  dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
    Preparing to unpack .../linux-modules-4.4.0-151-generic_4.4.0-151.178_amd64.deb ...
    Unpacking linux-modules-4.4.0-151-generic (4.4.0-151.178) ...
    dpkg: error processing archive /var/cache/apt/archives/linux-modules-4.4.0-151-generic_4.4.0-151.178_amd64.deb (--unpack):
     cannot copy extracted data for './boot/System.map-4.4.0-151-generic' to '/boot/System.map-4.4.0-151-generic.dpkg-new': failed to write (No space left on device)
    No apport report written because MaxReports is reached already
                                                                  dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
    Preparing to unpack .../linux-image-4.4.0-151-generic_4.4.0-151.178_amd64.deb ...
    Unpacking linux-image-4.4.0-151-generic (4.4.0-151.178) ...
    dpkg: error processing archive /var/cache/apt/archives/linux-image-4.4.0-151-generic_4.4.0-151.178_amd64.deb (--unpack):
     cannot copy extracted data for './boot/vmlinuz-4.4.0-151-generic' to '/boot/vmlinuz-4.4.0-151-generic.dpkg-new': failed to write (No space left on device)
    No apport report written because MaxReports is reached already
                                                                  dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
    Errors were encountered while processing:
     /var/cache/apt/archives/linux-modules-4.4.0-164-generic_4.4.0-164.192_amd64.deb
     /var/cache/apt/archives/linux-image-4.4.0-164-generic_4.4.0-164.192_amd64.deb
     /var/cache/apt/archives/linux-modules-4.4.0-150-generic_4.4.0-150.176_amd64.deb
     /var/cache/apt/archives/linux-image-4.4.0-150-generic_4.4.0-150.176_amd64.deb
     /var/cache/apt/archives/linux-modules-4.4.0-151-generic_4.4.0-151.178_amd64.deb
     /var/cache/apt/archives/linux-image-4.4.0-151-generic_4.4.0-151.178_amd64.deb
    E: Sub-process /usr/bin/dpkg returned an error code (1)

  10. #10
    Join Date
    Aug 2016
    Location
    Wandering
    Beans
    Hidden!
    Distro
    Xubuntu Development Release

    Re: Unable to clean/clear old kernels from /boot...

    TheFu has a solution for you, I have to go to work so I'll leave you in his very capable hands.
    Good Luck though.
    With realization of one's own potential and self-confidence in one's ability, one can build a better world.
    Dalai Lama>>
    Code Tags

Page 1 of 3 123 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
  •