Results 1 to 3 of 3

Thread: Can't remove old linux images

  1. #1
    Join Date
    Dec 2010
    Beans
    18

    Can't remove old linux images

    I'm trying to free up space on my system, and it seems that I have a bunch of old linux image/modules/extras that none of the automated methods I have tried are able to remove. I haven't tried manually removing them yet because I wanted to verify that it was safe to do so.

    My current image is 4.15.0-72-generic:
    Code:
    uname -r 
    4.15.0-72-generic
    I also have 4.15.0-70-generic loaded:
    Code:
    dpkg -l grep -E 'linux-image-[0-9]+'
    ii  linux-image-4.15.0-70-generic
    ii  linux-image-4.15.0-72-generic
    ...
    And a bunch of other images listed as already removed:
    Code:
    ...
    rc  linux-image-3.16.0-67-generic
    rc  linux-image-4.4.0-133-generic
    ...
    However, dpkg still reports a number of files associated with those removed images as taking up space on my machine:
    Code:
    dpkg-query -Wf '${Installed-Size}\t${Package}\n'
    ...
    158643    linux-image-extra-4.4.0-45-generic
    152723    linux-image-extra-3.16.0-67-generic
    152772    linux-image-extra-3.16.0-62-generic
    66596    linux-image-4.4.0-141-generic
    58329    linux-modules-4.4.0-169-generic
    ...
    I have tried to remove old kernels automatically using
    Code:
    apt-get --purge autoremove
    however, the offending images, modules, extras, etc. remain.

    I have not yet tried removing them individually, such as with
    Code:
    apt purge linux-modules-4.4.0-169-generic
    because I wanted to verify that I was correctly understanding that these are files associated with old kernel images and will not still be dependencies of my current 4.15 image. Is that correct?

    It may also be worth noting that
    Code:
    apt-mark showauto 'linux-*' 
    linux-image-4.15.0-70-generic
    linux-image-4.15.0-72-generic
    ...
    displays only versions relevant to my two installed kernels and

    Code:
    apt-mark showmanual 'linux-*'
    linux-generic
    linux-image-generic
    Is the complete output of showmanual.

    Thanks.
    Last edited by apocalypsemystic; June 7th, 2020 at 02:55 AM.

  2. #2
    Join Date
    Feb 2010
    Location
    Obscurial Springs
    Beans
    15,210
    Distro
    Ubuntu Budgie Development Release

    Re: Can't remove old linux images

    Have you tried with the synaptic package manager ? My old kernels have been showing up as auto removable in synaptic for the last few releases.
    "Our intention creates our reality. "

    Ubuntu Documentation Search: Popular Pages
    Ubuntu: Security Basics
    Ubuntu: Flavors

  3. #3
    Join Date
    Dec 2010
    Beans
    18

    Re: Can't remove old linux images

    I tried synaptic and it did seem to know that they could be safely removed so I ran it and it seems clear now. Thanks.

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
  •