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

Thread: Can't clean /boot folder

  1. #1
    Join Date
    Dec 2018
    Beans
    12

    Can't clean /boot folder

    I'm trying to install vsftpd on Ubuntu 18.04 LTS, but when I run apt-get install vsftpd I get this error:

    Code:
        You might want to run apt --fix-broken install to correct these.
        
        The following packages have unmet dependencies:
    
        linux-image-generic : Depends: linux-image-4.15.0-42-generic but it is not going to be installed
        
        Recommends: thermald but it is not going to be installed
        linux-modules-extra-4.15.0-39-generic : Depends: linux-image-4.15.0-39-generic but it is not going to be installed or
        
        linux-image-unsigned-4.15.0-39-generic but it is not going to be installed
        
        linux-modules-extra-4.15.0-42-generic : Depends: linux-image-4.15.0-42-generic but it is not going to be installed or
        
        linux-image-unsigned-4.15.0-42-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've tried run apt --fix-broken install and apt-get install -f vsftpd but with no sucess.


    df -h output:

    Code:
        Filesystem      Size  Used Avail Use% Mounted on
        /dev/root        39G  7.3G   30G  21% /
        devtmpfs        989M     0  989M   0% /dev
        tmpfs           992M     0  992M   0% /dev/shm
        tmpfs           992M  680K  992M   1% /run
        tmpfs           5.0M     0  5.0M   0% /run/lock
        tmpfs           992M     0  992M   0% /sys/fs/cgroup
        /dev/xvda1      232M  224M     0 100% /boot
        tmpfs           199M     0  199M   0% /run/user/0
    df -i output:

    Code:
        Filesystem      Inodes  IUsed   IFree IUse% Mounted on
        /dev/root      2537760 337826 2199934   14% /
        devtmpfs        253100    434  252666    1% /dev
        tmpfs           253889      1  253888    1% /dev/shm
        tmpfs           253889    606  253283    1% /run
        tmpfs           253889      4  253885    1% /run/lock
        tmpfs           253889     18  253871    1% /sys/fs/cgroup
        /dev/xvda1       62248    326   61922    1% /boot
        tmpfs           253889     10  253879    1% /run/user/0

    apt-cache policy linux-image-generic output:

    Code:
        linux-image-generic:
          Installed: 4.15.0.42.44
          Candidate: 4.15.0.42.44
          Version table:
         *** 4.15.0.42.44 500
                500 http://us.archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages
                500 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages
                100 /var/lib/dpkg/status
             4.15.0.20.23 500
                500 http://us.archive.ubuntu.com/ubuntu bionic/main amd64 Packages
             4.4.0.139.145 500
                500 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages
    uname -r output:

    Code:
        4.15.0-36-generic
    I also tried this command:

    Code:
        dpkg -l linux-image-\* | grep ^ii
    it shows only one kernel:
    Code:
        ii  linux-image-4.15.0-36-generic          4.15.0-36.39  amd64        Signed kernel image generic
    When I try to remove:

    Code:
        apt-get remove linux-image-4.15.0-36-generic
    The return is:

    Code:
        ou might want to run 'apt --fix-broken install' to correct these.
        The following packages have unmet dependencies:
         linux-image-generic : Depends: linux-image-4.15.0-42-generic but it is not going to be installed
                               Recommends: thermald but it is not going to be installed
         linux-modules-extra-4.15.0-36-generic : Depends: linux-image-4.15.0-36-generic but it is not going to be installed or
                                                          linux-image-unsigned-4.15.0-36-generic but it is not going to be installed
         linux-modules-extra-4.15.0-39-generic : Depends: linux-image-4.15.0-39-generic but it is not going to be installed or
                                                          linux-image-unsigned-4.15.0-39-generic but it is not going to be installed
         linux-modules-extra-4.15.0-42-generic : Depends: linux-image-4.15.0-42-generic but it is not going to be installed or
                                                          linux-image-unsigned-4.15.0-42-generic but it is not going to be installed
        E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

  2. #2
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Can't clean /boot folder

    Code:
    /dev/xvda1      232M  224M     0 100% /boot
    shows that /boot is full.


    I have 2 kernels on a debian server in my /boot/ and it looks like this:
    Code:
    $ df -h .
    Filesystem      Size  Used Avail Use% Mounted on
    /dev/vda1       228M   53M  164M  25% /boot
    
    and
    
    $ ll
    total 43362
    drwxr-xr-x  4 root root     1024 Nov 20 06:30 ./
    drwxr-xr-x 23 root root     4096 Oct  5 06:30 ../
    -rw-r--r--  1 root root   157842 Jul 14 17:45 config-3.16.0-6-amd64
    -rw-r--r--  1 root root   157842 Oct  4 09:42 config-3.16.0-7-amd64
    drwxr-xr-x  5 root root     5120 Oct  6 10:04 grub/
    -rw-r--r--  1 root root 16077029 Jul 15 06:49 initrd.img-3.16.0-6-amd64
    -rw-r--r--  1 root root 16079820 Nov 20 06:30 initrd.img-3.16.0-7-amd64
    drwxr-xr-x  2 root root    12288 Apr  7  2016 lost+found/
    -rw-r--r--  1 root root  2684515 Jul 14 17:45 System.map-3.16.0-6-amd64
    -rw-r--r--  1 root root  2686499 Oct  4 09:42 System.map-3.16.0-7-amd64
    -rw-r--r--  1 root root  3172432 Jul 14 17:44 vmlinuz-3.16.0-6-amd64
    -rw-r--r--  1 root root  3174656 Oct  4 09:39 vmlinuz-3.16.0-7-amd64
    shows the expected files. So something larger than expected is down there on your box. Start looking for files that don't belong. Perhaps an fsck is needed for that file system? How big is /boot/lost+found?

    I'm guessing you are running this inside some virtual machine - perhaps Xen?

    Fix the space issue first.
    Last edited by TheFu; December 6th, 2018 at 05:32 PM. Reason: wasn't ubuntu 16.04, sorry.

  3. #3
    Join Date
    Aug 2011
    Location
    52.5° N 6.4° E
    Beans
    6,820
    Distro
    Xubuntu 22.04 Jammy Jellyfish

    Re: Can't clean /boot folder

    Don't remove linux-image-4.15.0-36-generic. It's the kernel you're currently running and the only one correctly installed. Fortunately, your command to remove it failed.

    First have a look at all the kernel packages not correctly installed:
    Code:
    dpkg --list linux-\*
    Make sure you've got a big terminal window, so that all the output fits. Then we'll see which packages to remove.

  4. #4
    Join Date
    Dec 2018
    Beans
    12

    Re: Can't clean /boot folder

    I raw the command and the output is this:
    Code:
    Desired=Unknown/Install/Remove/Purge/Hold
    | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
    |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
    ||/ Name           Version      Architecture Description
    +++-==============-============-============-=================================
    ii  linux-base     4.5ubuntu1   all          Linux image base package
    un  linux-doc-4.15 <none>       <none>       (no description available)
    ii  linux-firmware 1.173.1      all          Firmware for Linux kernel drivers
    un  linux-firmware <none>       <none>       (no description available)
    iU  linux-generic  4.15.0.42.44 amd64        Complete Generic Linux kernel and
    un  linux-headers  <none>       <none>       (no description available)
    un  linux-headers- <none>       <none>       (no description available)
    iU  linux-headers- 4.15.0-30.32 all          Header files related to Linux ker
    un  linux-headers- <none>       <none>       (no description available)
    iU  linux-headers- 4.15.0-32.35 all          Header files related to Linux ker
    ii  linux-headers- 4.15.0-32.35 amd64        Linux kernel headers for version
    iU  linux-headers- 4.15.0-33.36 all          Header files related to Linux ker
    ii  linux-headers- 4.15.0-33.36 amd64        Linux kernel headers for version
    ii  linux-headers- 4.15.0-36.39 all          Header files related to Linux ker
    ii  linux-headers- 4.15.0-36.39 amd64        Linux kernel headers for version
    iU  linux-headers- 4.15.0-39.42 all          Header files related to Linux ker
    ii  linux-headers- 4.15.0-39.42 amd64        Linux kernel headers for version
    iU  linux-headers- 4.15.0-42.45 all          Header files related to Linux ker
    ii  linux-headers- 4.15.0-42.45 amd64        Linux kernel headers for version
    ii  linux-headers- 4.15.0.42.44 amd64        Generic Linux kernel headers
    un  linux-image    <none>       <none>       (no description available)
    ri  linux-image-4. 4.15.0-30.32 amd64        Signed kernel image generic
    ri  linux-image-4. 4.15.0-32.35 amd64        Signed kernel image generic
    ri  linux-image-4. 4.15.0-33.36 amd64        Signed kernel image generic
    ii  linux-image-4. 4.15.0-36.39 amd64        Signed kernel image generic
    in  linux-image-4. <none>       amd64        (no description available)
    in  linux-image-4. <none>       amd64        (no description available)
    un  linux-image-4. <none>       <none>       (no description available)
    rc  linux-image-ex 4.4.0-124.14 amd64        Linux kernel extra modules for ve
    iU  linux-image-ge 4.15.0.42.44 amd64        Generic Linux kernel image
    un  linux-image-un <none>       <none>       (no description available)
    un  linux-image-un <none>       <none>       (no description available)
    un  linux-image-un <none>       <none>       (no description available)
    un  linux-image-un <none>       <none>       (no description available)
    un  linux-image-un <none>       <none>       (no description available)
    un  linux-image-un <none>       <none>       (no description available)
    un  linux-initramf <none>       <none>       (no description available)
    un  linux-kernel-h <none>       <none>       (no description available)
    un  linux-kernel-l <none>       <none>       (no description available)
    ii  linux-libc-dev 4.15.0-39.42 amd64        Linux Kernel Headers for developm
    ii  linux-modules- 4.15.0-30.32 amd64        Linux kernel extra modules for ve
    ii  linux-modules- 4.15.0-32.35 amd64        Linux kernel extra modules for ve
    ii  linux-modules- 4.15.0-33.36 amd64        Linux kernel extra modules for ve
    ii  linux-modules- 4.15.0-36.39 amd64        Linux kernel extra modules for ve
    in  linux-modules- <none>       amd64        (no description available)
    in  linux-modules- <none>       amd64        (no description available)
    ii  linux-modules- 4.15.0-30.32 amd64        Linux kernel extra modules for ve
    ii  linux-modules- 4.15.0-32.35 amd64        Linux kernel extra modules for ve
    ii  linux-modules- 4.15.0-33.36 amd64        Linux kernel extra modules for ve
    ii  linux-modules- 4.15.0-36.39 amd64        Linux kernel extra modules for ve
    iU  linux-modules- 4.15.0-39.42 amd64        Linux kernel extra modules for ve
    iU  linux-modules- 4.15.0-42.45 amd64        Linux kernel extra modules for ve
    un  linux-restrict <none>       <none>       (no description available)
    un  linux-source-4 <none>       <none>       (no description available)
    un  linux-tools    <none>       <none>       (no description available)

  5. #5
    Join Date
    Jan 2006
    Location
    Sunny Southend-on-Sea
    Beans
    8,430
    Distro
    Kubuntu 20.04 Focal Fossa

    Re: Can't clean /boot folder

    It's all those linux-headers and linux-modules packages for Linux versions other than the one you're using that you want to remove. The other versions of linux-image have been marked for removal, but haven't yet been removed. Once you're down to just the one complete set of packages for the one version of Linux, you should have the space to upgrade to the newest version of Linux, which is what your initial install request required.
    None but ourselves can free our minds

  6. #6
    Join Date
    Aug 2011
    Location
    52.5° N 6.4° E
    Beans
    6,820
    Distro
    Xubuntu 22.04 Jammy Jellyfish

    Re: Can't clean /boot folder

    It would have been easier if you had made the terminal window a bit larger to make the output fit, but I think this will help to remove some old kernels:
    Code:
    sudo dpkg --purge linux-image-4.15.0-30-generic linux-modules-4.15.0-30-generic linux-modules-extra-4.15.0-30-generic
    sudo dpkg --purge linux-image-4.15.0-32-generic linux-modules-4.15.0-32-generic linux-modules-extra-4.15.0-32-generic
    sudo dpkg --purge linux-image-4.15.0-33-generic linux-modules-4.15.0-33-generic linux-modules-extra-4.15.0-33-generic
    You can, in the same way, remove the linux-headers-* packages with those version numbers and also all kernel and header packages with version number 4.15.0-39 and 4.4.0-124, which is a leftover from before your last release upgrade. Just keep 4.15.0-36 (your current kernel) and 4.15.0-42 (the new one you want to get installed).

    Then show the output of
    Code:
    dpkg --list linux-\*
    df -h
    This time, make the terminal window big, so we get full output. With a bit of luck, you can then fix the package manager with
    Code:
    sudo apt install -f
    Last edited by Impavidus; December 12th, 2018 at 10:53 AM. Reason: added sudo to commands

  7. #7
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Can't clean /boot folder

    Code:
    sudo apt autoremove
    and
    Code:
    sudo apt autoclean
    will probably remove all the stuff that isn't needed anymore, if the APT DB isn't too messed up. Those commands can't hurt.

    apt-get allows using regex pattern matching on package names, unlike the other "apt" commands.

  8. #8
    Join Date
    Dec 2018
    Beans
    12

    Re: Can't clean /boot folder

    I've tried this commands but with no sucess, this linux heardes still there.

  9. #9
    Join Date
    Aug 2011
    Location
    52.5° N 6.4° E
    Beans
    6,820
    Distro
    Xubuntu 22.04 Jammy Jellyfish

    Re: Can't clean /boot folder

    So what do you get from the commands I gave you in post #6? The full output may help.

    Note that there was a small error in the first three commands, as they need sudo. I fixed the above post. You can run them again; it can't hurt.

  10. #10
    Join Date
    Dec 2018
    Beans
    12

    Re: Can't clean /boot folder

    Quote Originally Posted by Impavidus View Post
    So what do you get from the commands I gave you in post #6? The full output may help.

    Note that there was a small error in the first three commands, as they need sudo. I fixed the above post. You can run them again; it can't hurt.
    I ran the commands as root and they return this for me:

    Code:
    # dpkg --purge linux-image-4.15.0-30-generic linux-modules-4.15.0-30-generic linux-modules-extra-4.15.0-30-generic
    dpkg: warning: ignoring request to remove linux-image-4.15.0-30-generic which isn't installed
    dpkg: warning: ignoring request to remove linux-modules-4.15.0-30-generic which isn't installed
    dpkg: warning: ignoring request to remove linux-modules-extra-4.15.0-30-generic which isn't installed
    # sudo dpkg --purge linux-image-4.15.0-32-generic linux-modules-4.15.0-32-generic linux-modules-extra-4.15.0-32-generic
    dpkg: warning: ignoring request to remove linux-image-4.15.0-32-generic which isn't installed
    dpkg: warning: ignoring request to remove linux-modules-4.15.0-32-generic which isn't installed
    dpkg: warning: ignoring request to remove linux-modules-extra-4.15.0-32-generic which isn't installed
    # sudo dpkg --purge linux-image-4.15.0-33-generic linux-modules-4.15.0-33-generic linux-modules-extra-4.15.0-33-generic
    dpkg: warning: ignoring request to remove linux-image-4.15.0-33-generic which isn't installed
    dpkg: warning: ignoring request to remove linux-modules-4.15.0-33-generic which isn't installed
    dpkg: warning: ignoring request to remove linux-modules-extra-4.15.0-33-generic which isn't installed

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
  •