Clean up old kernels

Questions about applications and software
Forum rules
Before you post please read how to get help
scorp123
Level 8
Level 8
Posts: 2272
Joined: Sat Dec 02, 2006 4:19 pm
Location: Switzerland

Re: Clean up old kernels

Post by scorp123 »

So I get rid of those residual packages ... aaaaand no change at all on /boot:

Code: Select all

> dpkg -l linux* | grep rc
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                               Version              Architecture Description
un  linux-source-4.4.0                 <none>               <none>       (no description available)

> df -h /boot
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1       464M   59M  377M  14% /boot
Whatever those "residual" files were ... they didn't seem to to take up any noteworthy amounts of space.

ostracized
Level 4
Level 4
Posts: 230
Joined: Tue Jun 14, 2016 11:46 pm

Re: Clean up old kernels

Post by ostracized »

Btw, now that there's a "branch" of 4.4 and 4.8 kernels in mint 18.1, what does purge-old-kernels do in this situation? Get rid of all the 4.4 kernels before evaluating the 4.8 ones? That would seem reasonable but potentially not desired since you may want the latest "LTS" kernel...

User avatar
Pjotr
Level 21
Level 21
Posts: 14429
Joined: Mon Mar 07, 2011 10:18 am
Location: The Netherlands (Holland)
Contact:

Re: Clean up old kernels

Post by Pjotr »

ostracized wrote:Btw, now that there's a "branch" of 4.4 and 4.8 kernels in mint 18.1, what does purge-old-kernels do in this situation? Get rid of all the 4.4 kernels before evaluating the 4.8 ones? That would seem reasonable but potentially not desired since you may want the latest "LTS" kernel...
Why use purge-old-kernels at all? In Linux Mint we have a fine kernel tool in Update Manager (panel: View - Linux kernels). :)

purge-old-kernels is fine, but only useful in the *buntu's. :mrgreen:
Tip: 10 things to do after installing Linux Mint 19.3 Tricia
Keep your Linux Mint healthy: Avoid these 10 fatal mistakes
Twitter: twitter.com/easylinuxtips
All in all, horse sense simply makes sense.

ostracized
Level 4
Level 4
Posts: 230
Joined: Tue Jun 14, 2016 11:46 pm

Re: Clean up old kernels

Post by ostracized »

Pjotr wrote:
ostracized wrote:Btw, now that there's a "branch" of 4.4 and 4.8 kernels in mint 18.1, what does purge-old-kernels do in this situation? Get rid of all the 4.4 kernels before evaluating the 4.8 ones? That would seem reasonable but potentially not desired since you may want the latest "LTS" kernel...
Why use purge-old-kernels at all? In Linux Mint we have a fine kernel tool in Update Manager (panel: View - Linux kernels). :)

purge-old-kernels is fine, but only useful in the *buntu's. :mrgreen:
I was initially concerned that this removal method doesn't actually free up space in /boot, but after testing -- it does, so I'm good. Just have to do them individually and it would still be nice to have an autoremovable feature in Mint that would actually mark these old kernels as "autoremovable" compared with other distros.

Piers66
Level 2
Level 2
Posts: 75
Joined: Fri Dec 25, 2015 2:17 pm
Location: London, UK

Re: Clean up old kernels

Post by Piers66 »

Hello,

After getting a disc space warning (time to clean out some of those video and audio files!) I thought I'd look into disc cleaning. I've got my head round APT, but as a relative newbie (been using Linux Mint for over a year, but not really gone under the hood much) I'm struggling with the terminology / acronyms / technicalities of much other stuff (well, most of it if I'm honest...).

After reading this thread I've had a look at Kernals in the update manager, and it's listing ~175 versions from 3.13.0-100 to 4.4.0-75. It says that 3.19.0-32 is loaded, recommended and installed.

Could someone please explain (in baby steps!) whether I ought/need to do a clean up, and how. That is...

Do I actually have 175 kernals stored on my PC?
If so, is there a reason to keep them all / Is there a problem with allowing them to mount up?
What's the benefit of deleting old kernals?
How many (and which) should I keep (assuming I actually have more than one)?
What do I actually do to remove them?

For info, I'm using Linux Mint 17.3 Rosa. Please say if I need to give more info than this. I also ran 'sudo apt-get clean' in the terminal window shortly before typing all this.

Thanks,

Piers.
Main: Dell E6410 - 8GB RAM / 160GB HDD - Dual Boot Mint 19.1 Cinnamon 64-bit / Win 10
Backup: iMac 5.1 - 3GB RAM / 240GB HDD - Dual Boot Mint 19.1 Cinnamon 64-bit / OSX 10.5.8

michellewardley
Level 1
Level 1
Posts: 13
Joined: Fri Jan 27, 2017 5:44 am

Re: Clean up old kernels

Post by michellewardley »

me too :x

User avatar
D-man
Level 3
Level 3
Posts: 115
Joined: Wed Aug 19, 2015 2:04 am
Location: Russia...Siberia...taiga

Re: Clean up old kernels

Post by D-man »

Piers66 and people who have similar questions,

The kernels you mentioned sounded like you were using Linux Mint 17.x.

After the example of the following image you will see that not all listed kernels are stored on your PC.
Only those marked as "Installed" are. And the one marked as "Loaded" is what you are currently using.
You can remove any of those that are marked as "Installed" only. You cannot do so to the one you are currently using (marked as "Loaded") indeed.
Image

If you have too many and want to remove some, I would better keep at least one more spare kernel that worked successfully enough in addition to the current one.
I think it is better to try kernels from the following series: 3.13 and 4.4. They will be supported till 2019. 3.16, 3.19, 4.2 don't receive updates any longer.

User avatar
Pjotr
Level 21
Level 21
Posts: 14429
Joined: Mon Mar 07, 2011 10:18 am
Location: The Netherlands (Holland)
Contact:

Re: Clean up old kernels

Post by Pjotr »

This is an easy way to keep the number of kernels down to two (active one and latest "old" one):
https://sites.google.com/site/easylinux ... one-stroke
(item 6.1, right column)
Tip: 10 things to do after installing Linux Mint 19.3 Tricia
Keep your Linux Mint healthy: Avoid these 10 fatal mistakes
Twitter: twitter.com/easylinuxtips
All in all, horse sense simply makes sense.

john_j
Level 1
Level 1
Posts: 2
Joined: Fri May 15, 2015 2:24 pm

Re: Clean up old kernels

Post by john_j »

Hi All,

As a happy but mostly unskilled OSS user I ran into this issue this morning and was successfully able to uninstall a bunch of old kernels using information in these comments. So, thank you all :)

I did have to try several times and some of the commands did not work as I'd expected, probably because I may not have had all the same packages installed as some of, is my guess as to why.

I also found that I could not remove the kernels until I closed the "update manager", which doubtlessly you all knew, but many of less skilled users might not.

Code: Select all

john@john-T420 ~ $ sudo dpkg -l linux* | grep ^ii | awk '{ print $2 }'
[sudo] password for john: 
linux-base
linux-firmware
linux-headers-4.10.0-30
linux-headers-4.10.0-30-generic
linux-headers-4.10.0-32
linux-headers-4.10.0-32-generic
linux-headers-4.10.0-33
linux-headers-4.10.0-33-generic
linux-headers-4.10.0-35
linux-headers-4.10.0-35-generic
linux-headers-4.10.0-37
linux-headers-4.10.0-37-generic
linux-headers-4.10.0-38
linux-headers-4.10.0-38-generic
linux-headers-4.10.0-40
linux-headers-4.10.0-40-generic
linux-headers-4.10.0-42
linux-headers-4.10.0-42-generic
linux-image-4.10.0-30-generic
linux-image-4.10.0-32-generic
linux-image-4.10.0-33-generic
linux-image-4.10.0-35-generic
linux-image-4.10.0-37-generic
linux-image-4.10.0-38-generic
linux-image-4.10.0-40-generic
linux-image-4.10.0-42-generic
linux-image-extra-4.10.0-30-generic
linux-image-extra-4.10.0-32-generic
linux-image-extra-4.10.0-33-generic
linux-image-extra-4.10.0-35-generic
linux-image-extra-4.10.0-37-generic
linux-image-extra-4.10.0-38-generic
linux-image-extra-4.10.0-40-generic
linux-libc-dev:amd64
linux-sound-base
linuxmint-keyring
john@john-T420 ~ $ df -h |grep boot
/dev/sda1                  472M  452M     0 100% /boot
john@john-T420 ~ $ df -h /boot
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1       472M  452M     0 100% /boot
john@john-T420 ~ $ dpkg -l linux* | grep ^rc
john@john-T420 ~ $ df -h /boot
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1       472M  452M     0 100% /boot
john@john-T420 ~ $ sudo purge-old-kernels(2)
bash: syntax error near unexpected token `('
john@john-T420 ~ $ sudo purge-old-kernels --keep 2
sudo: purge-old-kernels: command not found
john@john-T420 ~ $ df -h /boot
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1       472M  452M     0 100% /boot
john@john-T420 ~ $ sudo dpkg -l linux* | grep ^ii | awk '{ print $2 }'
linux-base
linux-firmware
linux-headers-4.10.0-30
linux-headers-4.10.0-30-generic
linux-headers-4.10.0-32
linux-headers-4.10.0-32-generic
linux-headers-4.10.0-33
linux-headers-4.10.0-33-generic
linux-headers-4.10.0-35
linux-headers-4.10.0-35-generic
linux-headers-4.10.0-37
linux-headers-4.10.0-37-generic
linux-headers-4.10.0-38
linux-headers-4.10.0-38-generic
linux-headers-4.10.0-40
linux-headers-4.10.0-40-generic
linux-headers-4.10.0-42
linux-headers-4.10.0-42-generic
linux-image-4.10.0-30-generic
linux-image-4.10.0-32-generic
linux-image-4.10.0-33-generic
linux-image-4.10.0-35-generic
linux-image-4.10.0-37-generic
linux-image-4.10.0-38-generic
linux-image-4.10.0-40-generic
linux-image-4.10.0-42-generic
linux-image-extra-4.10.0-30-generic
linux-image-extra-4.10.0-32-generic
linux-image-extra-4.10.0-33-generic
linux-image-extra-4.10.0-35-generic
linux-image-extra-4.10.0-37-generic
linux-image-extra-4.10.0-38-generic
linux-image-extra-4.10.0-40-generic
linux-libc-dev:amd64
linux-sound-base
linuxmint-keyring
john@john-T420 ~ $ sudo apt-get remove linux-image-4.10.0-30-generic linux-image-4.10.0-32-generic linux-image-4.10.0-33-generic linux-image-4.10.0-35-generic linux-image-4.10.0-37-generic
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  linux-image-4.10.0-30-generic linux-image-4.10.0-32-generic
  linux-image-4.10.0-33-generic linux-image-4.10.0-35-generic
  linux-image-4.10.0-37-generic linux-image-extra-4.10.0-30-generic
  linux-image-extra-4.10.0-32-generic linux-image-extra-4.10.0-33-generic
  linux-image-extra-4.10.0-35-generic linux-image-extra-4.10.0-37-generic
0 upgraded, 0 newly installed, 10 to remove and 0 not upgraded.
1 not fully installed or removed.
E: Could not get lock /var/cache/apt/archives/lock - open (11: Resource temporarily unavailable)
E: Unable to lock directory /var/cache/apt/archives/
john@john-T420 ~ $ sudo dpkg -l linux* | grep ^ii | awk '{ print $2 }'linux-base
linux-firmware
linux-headers-4.10.0-30
linux-headers-4.10.0-30-generic
linux-headers-4.10.0-32
linux-headers-4.10.0-32-generic
linux-headers-4.10.0-33
linux-headers-4.10.0-33-generic
linux-headers-4.10.0-35
linux-headers-4.10.0-35-generic
linux-headers-4.10.0-37
linux-headers-4.10.0-37-generic
linux-headers-4.10.0-38
linux-headers-4.10.0-38-generic
linux-headers-4.10.0-40
linux-headers-4.10.0-40-generic
linux-headers-4.10.0-42
linux-headers-4.10.0-42-generic
linux-image-4.10.0-30-generic
linux-image-4.10.0-32-generic
linux-image-4.10.0-33-generic
linux-image-4.10.0-35-generic
linux-image-4.10.0-37-generic
linux-image-4.10.0-38-generic
linux-image-4.10.0-40-generic
linux-image-4.10.0-42-generic
linux-image-extra-4.10.0-30-generic
linux-image-extra-4.10.0-32-generic
linux-image-extra-4.10.0-33-generic
linux-image-extra-4.10.0-35-generic
linux-image-extra-4.10.0-37-generic
linux-image-extra-4.10.0-38-generic
linux-image-extra-4.10.0-40-generic
linux-libc-dev:amd64
linux-sound-base
linuxmint-keyring
john@john-T420 ~ $ df -h /boot
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1       472M  452M     0 100% /boot
john@john-T420 ~ $ sudo apt-get remove linux-image-4.10.0-30-generic linux-image-4.10.0-32-generic linux-image-4.10.0-33-generic linux-image-4.10.0-35-generic linux-image-4.10.0-37-generic^C
john@john-T420 ~ $ sudo apt-get remove linux-headers-4.10.0-30
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  linux-headers-4.10.0-30 linux-headers-4.10.0-30-generic
0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded.
1 not fully installed or removed.
E: Could not get lock /var/cache/apt/archives/lock - open (11: Resource temporarily unavailable)
E: Unable to lock directory /var/cache/apt/archives/
john@john-T420 ~ $ linux-headers-4.10.0-30-generic
linux-headers-4.10.0-30-generic: command not found
john@john-T420 ~ $ sudo apt-get remove linux-headers-4.10.0-30-generic
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  linux-headers-4.10.0-30-generic
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
1 not fully installed or removed.
E: Could not get lock /var/cache/apt/archives/lock - open (11: Resource temporarily unavailable)
E: Unable to lock directory /var/cache/apt/archives/
john@john-T420 ~ $ sudo apt-get remove linux-image-4.10.0-30-generic
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  linux-image-4.10.0-30-generic linux-image-extra-4.10.0-30-generic
0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded.
1 not fully installed or removed.
E: Could not get lock /var/cache/apt/archives/lock - open (11: Resource temporarily unavailable)
E: Unable to lock directory /var/cache/apt/archives/
john@john-T420 ~ $ df -h /boot
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1       472M  452M     0 100% /boot
john@john-T420 ~ $ sudo dpkg -l linux* | grep ^ii | awk '{ print $2 }'
linux-base
linux-firmware
linux-headers-4.10.0-30
linux-headers-4.10.0-30-generic
linux-headers-4.10.0-32
linux-headers-4.10.0-32-generic
linux-headers-4.10.0-33
linux-headers-4.10.0-33-generic
linux-headers-4.10.0-35
linux-headers-4.10.0-35-generic
linux-headers-4.10.0-37
linux-headers-4.10.0-37-generic
linux-headers-4.10.0-38
linux-headers-4.10.0-38-generic
linux-headers-4.10.0-40
linux-headers-4.10.0-40-generic
linux-headers-4.10.0-42
linux-headers-4.10.0-42-generic
linux-image-4.10.0-30-generic
linux-image-4.10.0-32-generic
linux-image-4.10.0-33-generic
linux-image-4.10.0-35-generic
linux-image-4.10.0-37-generic
linux-image-4.10.0-38-generic
linux-image-4.10.0-40-generic
linux-image-4.10.0-42-generic
linux-image-extra-4.10.0-30-generic
linux-image-extra-4.10.0-32-generic
linux-image-extra-4.10.0-33-generic
linux-image-extra-4.10.0-35-generic
linux-image-extra-4.10.0-37-generic
linux-image-extra-4.10.0-38-generic
linux-image-extra-4.10.0-40-generic
linux-libc-dev:amd64
linux-sound-base
linuxmint-keyring
john@john-T420 ~ $ sudo apt-get remove linux-headers-4.10.0-30 linux-headers-4.10.0-30-generic linux-image-extra-4.10.0-30-generic
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  linux-headers-4.10.0-30 linux-headers-4.10.0-30-generic
  linux-image-extra-4.10.0-30-generic
0 upgraded, 0 newly installed, 3 to remove and 0 not upgraded.
1 not fully installed or removed.
E: Could not get lock /var/cache/apt/archives/lock - open (11: Resource temporarily unavailable)
E: Unable to lock directory /var/cache/apt/archives/
john@john-T420 ~ $ df -h /boot
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1       472M  452M     0 100% /boot
john@john-T420 ~ $ sudo dpkg -l linux* | grep ^ii | awk '{ print $2 }'
linux-base
linux-firmware
linux-headers-4.10.0-30
linux-headers-4.10.0-30-generic
linux-headers-4.10.0-32
linux-headers-4.10.0-32-generic
linux-headers-4.10.0-33
linux-headers-4.10.0-33-generic
linux-headers-4.10.0-35
linux-headers-4.10.0-35-generic
linux-headers-4.10.0-37
linux-headers-4.10.0-37-generic
linux-headers-4.10.0-38
linux-headers-4.10.0-38-generic
linux-headers-4.10.0-40
linux-headers-4.10.0-40-generic
linux-headers-4.10.0-42
linux-headers-4.10.0-42-generic
linux-image-4.10.0-30-generic
linux-image-4.10.0-32-generic
linux-image-4.10.0-33-generic
linux-image-4.10.0-35-generic
linux-image-4.10.0-37-generic
linux-image-4.10.0-38-generic
linux-image-4.10.0-40-generic
linux-image-4.10.0-42-generic
linux-image-extra-4.10.0-30-generic
linux-image-extra-4.10.0-32-generic
linux-image-extra-4.10.0-33-generic
linux-image-extra-4.10.0-35-generic
linux-image-extra-4.10.0-37-generic
linux-image-extra-4.10.0-38-generic
linux-image-extra-4.10.0-40-generic
linux-libc-dev:amd64
linux-sound-base
linuxmint-keyring
john@john-T420 ~ $ sudo apt-get --purge remove `dpkg -l linux* | grep ^rc | awk '{ print $2 }'`
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
E: Could not get lock /var/cache/apt/archives/lock - open (11: Resource temporarily unavailable)
E: Unable to lock directory /var/cache/apt/archives/
john@john-T420 ~ $ df -h /boot
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1       472M  452M     0 100% /boot
john@john-T420 ~ $ df -h /boot
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1       472M  452M     0 100% /boot
john@john-T420 ~ $ sudo dpkg -l linux* | grep ^ii | awk '{ print $2 }'
linux-base
linux-firmware
linux-headers-4.10.0-30
linux-headers-4.10.0-30-generic
linux-headers-4.10.0-32
linux-headers-4.10.0-32-generic
linux-headers-4.10.0-33
linux-headers-4.10.0-33-generic
linux-headers-4.10.0-35
linux-headers-4.10.0-35-generic
linux-headers-4.10.0-37
linux-headers-4.10.0-37-generic
linux-headers-4.10.0-38
linux-headers-4.10.0-38-generic
linux-headers-4.10.0-40
linux-headers-4.10.0-40-generic
linux-headers-4.10.0-42
linux-headers-4.10.0-42-generic
linux-image-4.10.0-30-generic
linux-image-4.10.0-32-generic
linux-image-4.10.0-33-generic
linux-image-4.10.0-35-generic
linux-image-4.10.0-37-generic
linux-image-4.10.0-38-generic
linux-image-4.10.0-40-generic
linux-image-4.10.0-42-generic
linux-image-extra-4.10.0-30-generic
linux-image-extra-4.10.0-32-generic
linux-image-extra-4.10.0-33-generic
linux-image-extra-4.10.0-35-generic
linux-image-extra-4.10.0-37-generic
linux-image-extra-4.10.0-38-generic
linux-image-extra-4.10.0-40-generic
linux-libc-dev:amd64
linux-sound-base
linuxmint-keyring
john@john-T420 ~ $ sudo apt-get remove linux-headers-4.10.0-30 linux-headers-4.10.0-30-generic linux-image-extra-4.10.0-30-generic
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  linux-headers-4.10.0-30 linux-headers-4.10.0-30-generic linux-image-extra-4.10.0-30-generic
0 upgraded, 0 newly installed, 3 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 238 MB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 481661 files and directories currently installed.)
Removing linux-headers-4.10.0-30-generic (4.10.0-30.34~16.04.1) ...
Removing linux-headers-4.10.0-30 (4.10.0-30.34~16.04.1) ...
Removing linux-image-extra-4.10.0-30-generic (4.10.0-30.34~16.04.1) ...
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.10.0-30-generic /boot/vmlinuz-4.10.0-30-generic
run-parts: executing /etc/kernel/postinst.d/dkms 4.10.0-30-generic /boot/vmlinuz-4.10.0-30-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.10.0-30-generic /boot/vmlinuz-4.10.0-30-generic
update-initramfs: Generating /boot/initrd.img-4.10.0-30-generic
Warning: No support for locale: en_CA.utf8
run-parts: executing /etc/kernel/postinst.d/pm-utils 4.10.0-30-generic /boot/vmlinuz-4.10.0-30-generic
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 4.10.0-30-generic /boot/vmlinuz-4.10.0-30-generic
Generating grub configuration file ...
Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.
Found linux image: /boot/vmlinuz-4.10.0-42-generic
Found initrd image: /boot/initrd.img-4.10.0-42-generic
Found linux image: /boot/vmlinuz-4.10.0-40-generic
Found initrd image: /boot/initrd.img-4.10.0-40-generic
Found linux image: /boot/vmlinuz-4.10.0-38-generic
Found initrd image: /boot/initrd.img-4.10.0-38-generic
Found linux image: /boot/vmlinuz-4.10.0-37-generic
Found initrd image: /boot/initrd.img-4.10.0-37-generic
Found linux image: /boot/vmlinuz-4.10.0-35-generic
Found initrd image: /boot/initrd.img-4.10.0-35-generic
Found linux image: /boot/vmlinuz-4.10.0-33-generic
Found initrd image: /boot/initrd.img-4.10.0-33-generic
Found linux image: /boot/vmlinuz-4.10.0-32-generic
Found initrd image: /boot/initrd.img-4.10.0-32-generic
Found linux image: /boot/vmlinuz-4.10.0-30-generic
Found initrd image: /boot/initrd.img-4.10.0-30-generic
Found memtest86+ image: /memtest86+.elf
Found memtest86+ image: /memtest86+.bin
done
Setting up linux-image-extra-4.10.0-42-generic (4.10.0-42.46~16.04.1) ...
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.10.0-42-generic /boot/vmlinuz-4.10.0-42-generic
run-parts: executing /etc/kernel/postinst.d/dkms 4.10.0-42-generic /boot/vmlinuz-4.10.0-42-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.10.0-42-generic /boot/vmlinuz-4.10.0-42-generic
update-initramfs: Generating /boot/initrd.img-4.10.0-42-generic
Warning: No support for locale: en_CA.utf8
run-parts: executing /etc/kernel/postinst.d/pm-utils 4.10.0-42-generic /boot/vmlinuz-4.10.0-42-generic
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 4.10.0-42-generic /boot/vmlinuz-4.10.0-42-generic
Generating grub configuration file ...
Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.
Found linux image: /boot/vmlinuz-4.10.0-42-generic
Found initrd image: /boot/initrd.img-4.10.0-42-generic
Found linux image: /boot/vmlinuz-4.10.0-40-generic
Found initrd image: /boot/initrd.img-4.10.0-40-generic
Found linux image: /boot/vmlinuz-4.10.0-38-generic
Found initrd image: /boot/initrd.img-4.10.0-38-generic
Found linux image: /boot/vmlinuz-4.10.0-37-generic
Found initrd image: /boot/initrd.img-4.10.0-37-generic
Found linux image: /boot/vmlinuz-4.10.0-35-generic
Found initrd image: /boot/initrd.img-4.10.0-35-generic
Found linux image: /boot/vmlinuz-4.10.0-33-generic
Found initrd image: /boot/initrd.img-4.10.0-33-generic
Found linux image: /boot/vmlinuz-4.10.0-32-generic
Found initrd image: /boot/initrd.img-4.10.0-32-generic
Found linux image: /boot/vmlinuz-4.10.0-30-generic
Found initrd image: /boot/initrd.img-4.10.0-30-generic
Found memtest86+ image: /memtest86+.elf
Found memtest86+ image: /memtest86+.bin
done
john@john-T420 ~ $ sudo dpkg -l linux* | grep ^ii | awk '{ print $2 }'
linux-base
linux-firmware
linux-headers-4.10.0-32
linux-headers-4.10.0-32-generic
linux-headers-4.10.0-33
linux-headers-4.10.0-33-generic
linux-headers-4.10.0-35
linux-headers-4.10.0-35-generic
linux-headers-4.10.0-37
linux-headers-4.10.0-37-generic
linux-headers-4.10.0-38
linux-headers-4.10.0-38-generic
linux-headers-4.10.0-40
linux-headers-4.10.0-40-generic
linux-headers-4.10.0-42
linux-headers-4.10.0-42-generic
linux-image-4.10.0-30-generic
linux-image-4.10.0-32-generic
linux-image-4.10.0-33-generic
linux-image-4.10.0-35-generic
linux-image-4.10.0-37-generic
linux-image-4.10.0-38-generic
linux-image-4.10.0-40-generic
linux-image-4.10.0-42-generic
linux-image-extra-4.10.0-32-generic
linux-image-extra-4.10.0-33-generic
linux-image-extra-4.10.0-35-generic
linux-image-extra-4.10.0-37-generic
linux-image-extra-4.10.0-38-generic
linux-image-extra-4.10.0-40-generic
linux-image-extra-4.10.0-42-generic
linux-libc-dev:amd64
linux-sound-base
linuxmint-keyring
john@john-T420 ~ $ df -h /boot
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1       472M  428M   20M  96% /boot
john@john-T420 ~ $ sudo dpkg -l linux* | grep ^ii | awk '{ print $2 }'
linux-base
linux-firmware
linux-headers-4.10.0-32
linux-headers-4.10.0-32-generic
linux-headers-4.10.0-33
linux-headers-4.10.0-33-generic
linux-headers-4.10.0-35
linux-headers-4.10.0-35-generic
linux-headers-4.10.0-37
linux-headers-4.10.0-37-generic
linux-headers-4.10.0-38
linux-headers-4.10.0-38-generic
linux-headers-4.10.0-40
linux-headers-4.10.0-40-generic
linux-headers-4.10.0-42
linux-headers-4.10.0-42-generic
linux-image-4.10.0-30-generic
linux-image-4.10.0-32-generic
linux-image-4.10.0-33-generic
linux-image-4.10.0-35-generic
linux-image-4.10.0-37-generic
linux-image-4.10.0-38-generic
linux-image-4.10.0-40-generic
linux-image-4.10.0-42-generic
linux-image-extra-4.10.0-32-generic
linux-image-extra-4.10.0-33-generic
linux-image-extra-4.10.0-35-generic
linux-image-extra-4.10.0-37-generic
linux-image-extra-4.10.0-38-generic
linux-image-extra-4.10.0-40-generic
linux-image-extra-4.10.0-42-generic
linux-libc-dev:amd64
linux-sound-base
linuxmint-keyring
john@john-T420 ~ $ sudo apt-get --purge remove `dpkg -l linux* | grep ^rc | awk '{ print $2 }'`
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  linux-image-extra-4.10.0-30-generic*
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
(Reading database ... 448905 files and directories currently installed.)
Removing linux-image-extra-4.10.0-30-generic (4.10.0-30.34~16.04.1) ...
Purging configuration files for linux-image-extra-4.10.0-30-generic (4.10.0-30.34~16.04.1) ...
john@john-T420 ~ $ df -h /boot
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1       472M  428M   20M  96% /boot
john@john-T420 ~ $ sudo apt-get remove linux-headers-4.10.0-32 linux-headers-4.10.0-32-generic linux-image-extra-4.10.0-32-generic linux-headers-4.10.0-33 linux-headers-4.10.0-33-generic linux-image-extra-4.10.0-33-generic linux-headers-4.10.0-35 linux-headers-4.10.0-35-generic linux-image-extra-4.10.0-35-generic linux-headers-4.10.0-37 linux-headers-4.10.0-37-generic linux-image-extra-4.10.0-37-generic
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  linux-headers-4.10.0-32 linux-headers-4.10.0-32-generic linux-headers-4.10.0-33 linux-headers-4.10.0-33-generic
  linux-headers-4.10.0-35 linux-headers-4.10.0-35-generic linux-headers-4.10.0-37 linux-headers-4.10.0-37-generic
  linux-image-extra-4.10.0-32-generic linux-image-extra-4.10.0-33-generic linux-image-extra-4.10.0-35-generic
  linux-image-extra-4.10.0-37-generic
0 upgraded, 0 newly installed, 12 to remove and 0 not upgraded.
After this operation, 951 MB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 448905 files and directories currently installed.)
Removing linux-headers-4.10.0-32-generic (4.10.0-32.36~16.04.1) ...
Removing linux-headers-4.10.0-32 (4.10.0-32.36~16.04.1) ...
Removing linux-headers-4.10.0-33-generic (4.10.0-33.37~16.04.1) ...
Removing linux-headers-4.10.0-33 (4.10.0-33.37~16.04.1) ...
Removing linux-headers-4.10.0-35-generic (4.10.0-35.39~16.04.1) ...
Removing linux-headers-4.10.0-35 (4.10.0-35.39~16.04.1) ...
Removing linux-headers-4.10.0-37-generic (4.10.0-37.41~16.04.1) ...
Removing linux-headers-4.10.0-37 (4.10.0-37.41~16.04.1) ...
Removing linux-image-extra-4.10.0-32-generic (4.10.0-32.36~16.04.1) ...
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.10.0-32-generic /boot/vmlinuz-4.10.0-32-generic
run-parts: executing /etc/kernel/postinst.d/dkms 4.10.0-32-generic /boot/vmlinuz-4.10.0-32-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.10.0-32-generic /boot/vmlinuz-4.10.0-32-generic
update-initramfs: Generating /boot/initrd.img-4.10.0-32-generic
Warning: No support for locale: en_CA.utf8
run-parts: executing /etc/kernel/postinst.d/pm-utils 4.10.0-32-generic /boot/vmlinuz-4.10.0-32-generic
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 4.10.0-32-generic /boot/vmlinuz-4.10.0-32-generic
Generating grub configuration file ...
Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.
Found linux image: /boot/vmlinuz-4.10.0-42-generic
Found initrd image: /boot/initrd.img-4.10.0-42-generic
Found linux image: /boot/vmlinuz-4.10.0-40-generic
Found initrd image: /boot/initrd.img-4.10.0-40-generic
Found linux image: /boot/vmlinuz-4.10.0-38-generic
Found initrd image: /boot/initrd.img-4.10.0-38-generic
Found linux image: /boot/vmlinuz-4.10.0-37-generic
Found initrd image: /boot/initrd.img-4.10.0-37-generic
Found linux image: /boot/vmlinuz-4.10.0-35-generic
Found initrd image: /boot/initrd.img-4.10.0-35-generic
Found linux image: /boot/vmlinuz-4.10.0-33-generic
Found initrd image: /boot/initrd.img-4.10.0-33-generic
Found linux image: /boot/vmlinuz-4.10.0-32-generic
Found initrd image: /boot/initrd.img-4.10.0-32-generic
Found linux image: /boot/vmlinuz-4.10.0-30-generic
Found initrd image: /boot/initrd.img-4.10.0-30-generic
Found memtest86+ image: /memtest86+.elf
Found memtest86+ image: /memtest86+.bin
done
Removing linux-image-extra-4.10.0-33-generic (4.10.0-33.37~16.04.1) ...
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.10.0-33-generic /boot/vmlinuz-4.10.0-33-generic
run-parts: executing /etc/kernel/postinst.d/dkms 4.10.0-33-generic /boot/vmlinuz-4.10.0-33-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.10.0-33-generic /boot/vmlinuz-4.10.0-33-generic
update-initramfs: Generating /boot/initrd.img-4.10.0-33-generic
Warning: No support for locale: en_CA.utf8
run-parts: executing /etc/kernel/postinst.d/pm-utils 4.10.0-33-generic /boot/vmlinuz-4.10.0-33-generic
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 4.10.0-33-generic /boot/vmlinuz-4.10.0-33-generic
Generating grub configuration file ...
Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.
Found linux image: /boot/vmlinuz-4.10.0-42-generic
Found initrd image: /boot/initrd.img-4.10.0-42-generic
Found linux image: /boot/vmlinuz-4.10.0-40-generic
Found initrd image: /boot/initrd.img-4.10.0-40-generic
Found linux image: /boot/vmlinuz-4.10.0-38-generic
Found initrd image: /boot/initrd.img-4.10.0-38-generic
Found linux image: /boot/vmlinuz-4.10.0-37-generic
Found initrd image: /boot/initrd.img-4.10.0-37-generic
Found linux image: /boot/vmlinuz-4.10.0-35-generic
Found initrd image: /boot/initrd.img-4.10.0-35-generic
Found linux image: /boot/vmlinuz-4.10.0-33-generic
Found initrd image: /boot/initrd.img-4.10.0-33-generic
Found linux image: /boot/vmlinuz-4.10.0-32-generic
Found initrd image: /boot/initrd.img-4.10.0-32-generic
Found linux image: /boot/vmlinuz-4.10.0-30-generic
Found initrd image: /boot/initrd.img-4.10.0-30-generic
Found memtest86+ image: /memtest86+.elf
Found memtest86+ image: /memtest86+.bin
done
Removing linux-image-extra-4.10.0-35-generic (4.10.0-35.39~16.04.1) ...
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.10.0-35-generic /boot/vmlinuz-4.10.0-35-generic
run-parts: executing /etc/kernel/postinst.d/dkms 4.10.0-35-generic /boot/vmlinuz-4.10.0-35-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.10.0-35-generic /boot/vmlinuz-4.10.0-35-generic
update-initramfs: Generating /boot/initrd.img-4.10.0-35-generic
Warning: No support for locale: en_CA.utf8
run-parts: executing /etc/kernel/postinst.d/pm-utils 4.10.0-35-generic /boot/vmlinuz-4.10.0-35-generic
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 4.10.0-35-generic /boot/vmlinuz-4.10.0-35-generic
Generating grub configuration file ...
Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.
Found linux image: /boot/vmlinuz-4.10.0-42-generic
Found initrd image: /boot/initrd.img-4.10.0-42-generic
Found linux image: /boot/vmlinuz-4.10.0-40-generic
Found initrd image: /boot/initrd.img-4.10.0-40-generic
Found linux image: /boot/vmlinuz-4.10.0-38-generic
Found initrd image: /boot/initrd.img-4.10.0-38-generic
Found linux image: /boot/vmlinuz-4.10.0-37-generic
Found initrd image: /boot/initrd.img-4.10.0-37-generic
Found linux image: /boot/vmlinuz-4.10.0-35-generic
Found initrd image: /boot/initrd.img-4.10.0-35-generic
Found linux image: /boot/vmlinuz-4.10.0-33-generic
Found initrd image: /boot/initrd.img-4.10.0-33-generic
Found linux image: /boot/vmlinuz-4.10.0-32-generic
Found initrd image: /boot/initrd.img-4.10.0-32-generic
Found linux image: /boot/vmlinuz-4.10.0-30-generic
Found initrd image: /boot/initrd.img-4.10.0-30-generic
Found memtest86+ image: /memtest86+.elf
Found memtest86+ image: /memtest86+.bin
done
Removing linux-image-extra-4.10.0-37-generic (4.10.0-37.41~16.04.1) ...
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.10.0-37-generic /boot/vmlinuz-4.10.0-37-generic
run-parts: executing /etc/kernel/postinst.d/dkms 4.10.0-37-generic /boot/vmlinuz-4.10.0-37-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.10.0-37-generic /boot/vmlinuz-4.10.0-37-generic
update-initramfs: Generating /boot/initrd.img-4.10.0-37-generic
Warning: No support for locale: en_CA.utf8
run-parts: executing /etc/kernel/postinst.d/pm-utils 4.10.0-37-generic /boot/vmlinuz-4.10.0-37-generic
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 4.10.0-37-generic /boot/vmlinuz-4.10.0-37-generic
Generating grub configuration file ...
Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.
Found linux image: /boot/vmlinuz-4.10.0-42-generic
Found initrd image: /boot/initrd.img-4.10.0-42-generic
Found linux image: /boot/vmlinuz-4.10.0-40-generic
Found initrd image: /boot/initrd.img-4.10.0-40-generic
Found linux image: /boot/vmlinuz-4.10.0-38-generic
Found initrd image: /boot/initrd.img-4.10.0-38-generic
Found linux image: /boot/vmlinuz-4.10.0-37-generic
Found initrd image: /boot/initrd.img-4.10.0-37-generic
Found linux image: /boot/vmlinuz-4.10.0-35-generic
Found initrd image: /boot/initrd.img-4.10.0-35-generic
Found linux image: /boot/vmlinuz-4.10.0-33-generic
Found initrd image: /boot/initrd.img-4.10.0-33-generic
Found linux image: /boot/vmlinuz-4.10.0-32-generic
Found initrd image: /boot/initrd.img-4.10.0-32-generic
Found linux image: /boot/vmlinuz-4.10.0-30-generic
Found initrd image: /boot/initrd.img-4.10.0-30-generic
Found memtest86+ image: /memtest86+.elf
Found memtest86+ image: /memtest86+.bin
done
john@john-T420 ~ $ df -h /boot
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1       472M  333M  115M  75% /boot
john@john-T420 ~ $ sudo dpkg -l linux* | grep ^ii | awk '{ print $2 }'
linux-base
linux-firmware
linux-headers-4.10.0-38
linux-headers-4.10.0-38-generic
linux-headers-4.10.0-40
linux-headers-4.10.0-40-generic
linux-headers-4.10.0-42
linux-headers-4.10.0-42-generic
linux-image-4.10.0-30-generic
linux-image-4.10.0-32-generic
linux-image-4.10.0-33-generic
linux-image-4.10.0-35-generic
linux-image-4.10.0-37-generic
linux-image-4.10.0-38-generic
linux-image-4.10.0-40-generic
linux-image-4.10.0-42-generic
linux-image-extra-4.10.0-38-generic
linux-image-extra-4.10.0-40-generic
linux-image-extra-4.10.0-42-generic
linux-libc-dev:amd64
linux-sound-base
linuxmint-keyring
john@john-T420 ~ $ sudo apt-get remove linux-image-4.10.0-30-generic linux-image-4.10.0-32-generic linux-image-4.10.0-33-generic linux-image-4.10.0-35-generic linux-image-4.10.0-37-generic
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  linux-image-4.10.0-30-generic linux-image-4.10.0-32-generic linux-image-4.10.0-33-generic linux-image-4.10.0-35-generic
  linux-image-4.10.0-37-generic
0 upgraded, 0 newly installed, 5 to remove and 0 not upgraded.
After this operation, 350 MB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 317881 files and directories currently installed.)
Removing linux-image-4.10.0-30-generic (4.10.0-30.34~16.04.1) ...
Examining /etc/kernel/prerm.d.
run-parts: executing /etc/kernel/prerm.d/dkms 4.10.0-30-generic /boot/vmlinuz-4.10.0-30-generic
dkms: removing: ndiswrapper 1.60 (4.10.0-30-generic) (x86_64)

-------- Uninstall Beginning --------
Module:  ndiswrapper
Version: 1.60
Kernel:  4.10.0-30-generic (x86_64)
-------------------------------------

Status: Before uninstall, this module version was ACTIVE on this kernel.

ndiswrapper.ko:
 - Uninstallation
   - Deleting from: /lib/modules/4.10.0-30-generic/updates/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.

depmod....

DKMS: uninstall completed.
dkms: removing: virtualbox 5.0.40 (4.10.0-30-generic) (x86_64)

-------- Uninstall Beginning --------
Module:  virtualbox
Version: 5.0.40
Kernel:  4.10.0-30-generic (x86_64)
-------------------------------------

Status: Before uninstall, this module version was ACTIVE on this kernel.

vboxdrv.ko:
 - Uninstallation
   - Deleting from: /lib/modules/4.10.0-30-generic/updates/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.


vboxnetadp.ko:
 - Uninstallation
   - Deleting from: /lib/modules/4.10.0-30-generic/updates/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.


vboxnetflt.ko:
 - Uninstallation
   - Deleting from: /lib/modules/4.10.0-30-generic/updates/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.


vboxpci.ko:
 - Uninstallation
   - Deleting from: /lib/modules/4.10.0-30-generic/updates/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.

depmod....

DKMS: uninstall completed.
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 4.10.0-30-generic /boot/vmlinuz-4.10.0-30-generic
update-initramfs: Deleting /boot/initrd.img-4.10.0-30-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 4.10.0-30-generic /boot/vmlinuz-4.10.0-30-generic
Generating grub configuration file ...
Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.
Found linux image: /boot/vmlinuz-4.10.0-42-generic
Found initrd image: /boot/initrd.img-4.10.0-42-generic
Found linux image: /boot/vmlinuz-4.10.0-40-generic
Found initrd image: /boot/initrd.img-4.10.0-40-generic
Found linux image: /boot/vmlinuz-4.10.0-38-generic
Found initrd image: /boot/initrd.img-4.10.0-38-generic
Found linux image: /boot/vmlinuz-4.10.0-37-generic
Found initrd image: /boot/initrd.img-4.10.0-37-generic
Found linux image: /boot/vmlinuz-4.10.0-35-generic
Found initrd image: /boot/initrd.img-4.10.0-35-generic
Found linux image: /boot/vmlinuz-4.10.0-33-generic
Found initrd image: /boot/initrd.img-4.10.0-33-generic
Found linux image: /boot/vmlinuz-4.10.0-32-generic
Found initrd image: /boot/initrd.img-4.10.0-32-generic
Found memtest86+ image: /memtest86+.elf
Found memtest86+ image: /memtest86+.bin
done
Removing linux-image-4.10.0-32-generic (4.10.0-32.36~16.04.1) ...
Examining /etc/kernel/prerm.d.
run-parts: executing /etc/kernel/prerm.d/dkms 4.10.0-32-generic /boot/vmlinuz-4.10.0-32-generic
dkms: removing: ndiswrapper 1.60 (4.10.0-32-generic) (x86_64)

-------- Uninstall Beginning --------
Module:  ndiswrapper
Version: 1.60
Kernel:  4.10.0-32-generic (x86_64)
-------------------------------------

Status: Before uninstall, this module version was ACTIVE on this kernel.

ndiswrapper.ko:
 - Uninstallation
   - Deleting from: /lib/modules/4.10.0-32-generic/updates/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.

depmod....

DKMS: uninstall completed.
dkms: removing: virtualbox 5.0.40 (4.10.0-32-generic) (x86_64)

-------- Uninstall Beginning --------
Module:  virtualbox
Version: 5.0.40
Kernel:  4.10.0-32-generic (x86_64)
-------------------------------------

Status: Before uninstall, this module version was ACTIVE on this kernel.

vboxdrv.ko:
 - Uninstallation
   - Deleting from: /lib/modules/4.10.0-32-generic/updates/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.


vboxnetadp.ko:
 - Uninstallation
   - Deleting from: /lib/modules/4.10.0-32-generic/updates/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.


vboxnetflt.ko:
 - Uninstallation
   - Deleting from: /lib/modules/4.10.0-32-generic/updates/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.


vboxpci.ko:
 - Uninstallation
   - Deleting from: /lib/modules/4.10.0-32-generic/updates/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.

depmod....

DKMS: uninstall completed.
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 4.10.0-32-generic /boot/vmlinuz-4.10.0-32-generic
update-initramfs: Deleting /boot/initrd.img-4.10.0-32-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 4.10.0-32-generic /boot/vmlinuz-4.10.0-32-generic
Generating grub configuration file ...
Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.
Found linux image: /boot/vmlinuz-4.10.0-42-generic
Found initrd image: /boot/initrd.img-4.10.0-42-generic
Found linux image: /boot/vmlinuz-4.10.0-40-generic
Found initrd image: /boot/initrd.img-4.10.0-40-generic
Found linux image: /boot/vmlinuz-4.10.0-38-generic
Found initrd image: /boot/initrd.img-4.10.0-38-generic
Found linux image: /boot/vmlinuz-4.10.0-37-generic
Found initrd image: /boot/initrd.img-4.10.0-37-generic
Found linux image: /boot/vmlinuz-4.10.0-35-generic
Found initrd image: /boot/initrd.img-4.10.0-35-generic
Found linux image: /boot/vmlinuz-4.10.0-33-generic
Found initrd image: /boot/initrd.img-4.10.0-33-generic
Found memtest86+ image: /memtest86+.elf
Found memtest86+ image: /memtest86+.bin
done
Removing linux-image-4.10.0-33-generic (4.10.0-33.37~16.04.1) ...
Examining /etc/kernel/prerm.d.
run-parts: executing /etc/kernel/prerm.d/dkms 4.10.0-33-generic /boot/vmlinuz-4.10.0-33-generic
dkms: removing: ndiswrapper 1.60 (4.10.0-33-generic) (x86_64)

-------- Uninstall Beginning --------
Module:  ndiswrapper
Version: 1.60
Kernel:  4.10.0-33-generic (x86_64)
-------------------------------------

Status: Before uninstall, this module version was ACTIVE on this kernel.

ndiswrapper.ko:
 - Uninstallation
   - Deleting from: /lib/modules/4.10.0-33-generic/updates/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.

depmod....

DKMS: uninstall completed.
dkms: removing: virtualbox 5.0.40 (4.10.0-33-generic) (x86_64)

-------- Uninstall Beginning --------
Module:  virtualbox
Version: 5.0.40
Kernel:  4.10.0-33-generic (x86_64)
-------------------------------------

Status: Before uninstall, this module version was ACTIVE on this kernel.

vboxdrv.ko:
 - Uninstallation
   - Deleting from: /lib/modules/4.10.0-33-generic/updates/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.


vboxnetadp.ko:
 - Uninstallation
   - Deleting from: /lib/modules/4.10.0-33-generic/updates/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.


vboxnetflt.ko:
 - Uninstallation
   - Deleting from: /lib/modules/4.10.0-33-generic/updates/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.


vboxpci.ko:
 - Uninstallation
   - Deleting from: /lib/modules/4.10.0-33-generic/updates/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.

depmod....

DKMS: uninstall completed.
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 4.10.0-33-generic /boot/vmlinuz-4.10.0-33-generic
update-initramfs: Deleting /boot/initrd.img-4.10.0-33-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 4.10.0-33-generic /boot/vmlinuz-4.10.0-33-generic
Generating grub configuration file ...
Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.
Found linux image: /boot/vmlinuz-4.10.0-42-generic
Found initrd image: /boot/initrd.img-4.10.0-42-generic
Found linux image: /boot/vmlinuz-4.10.0-40-generic
Found initrd image: /boot/initrd.img-4.10.0-40-generic
Found linux image: /boot/vmlinuz-4.10.0-38-generic
Found initrd image: /boot/initrd.img-4.10.0-38-generic
Found linux image: /boot/vmlinuz-4.10.0-37-generic
Found initrd image: /boot/initrd.img-4.10.0-37-generic
Found linux image: /boot/vmlinuz-4.10.0-35-generic
Found initrd image: /boot/initrd.img-4.10.0-35-generic
Found memtest86+ image: /memtest86+.elf
Found memtest86+ image: /memtest86+.bin
done
Removing linux-image-4.10.0-35-generic (4.10.0-35.39~16.04.1) ...
Examining /etc/kernel/prerm.d.
run-parts: executing /etc/kernel/prerm.d/dkms 4.10.0-35-generic /boot/vmlinuz-4.10.0-35-generic
dkms: removing: ndiswrapper 1.60 (4.10.0-35-generic) (x86_64)

-------- Uninstall Beginning --------
Module:  ndiswrapper
Version: 1.60
Kernel:  4.10.0-35-generic (x86_64)
-------------------------------------

Status: Before uninstall, this module version was ACTIVE on this kernel.

ndiswrapper.ko:
 - Uninstallation
   - Deleting from: /lib/modules/4.10.0-35-generic/updates/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.

depmod....

DKMS: uninstall completed.
dkms: removing: virtualbox 5.0.40 (4.10.0-35-generic) (x86_64)

-------- Uninstall Beginning --------
Module:  virtualbox
Version: 5.0.40
Kernel:  4.10.0-35-generic (x86_64)
-------------------------------------

Status: Before uninstall, this module version was ACTIVE on this kernel.

vboxdrv.ko:
 - Uninstallation
   - Deleting from: /lib/modules/4.10.0-35-generic/updates/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.


vboxnetadp.ko:
 - Uninstallation
   - Deleting from: /lib/modules/4.10.0-35-generic/updates/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.


vboxnetflt.ko:
 - Uninstallation
   - Deleting from: /lib/modules/4.10.0-35-generic/updates/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.


vboxpci.ko:
 - Uninstallation
   - Deleting from: /lib/modules/4.10.0-35-generic/updates/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.

depmod....

DKMS: uninstall completed.
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 4.10.0-35-generic /boot/vmlinuz-4.10.0-35-generic
update-initramfs: Deleting /boot/initrd.img-4.10.0-35-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 4.10.0-35-generic /boot/vmlinuz-4.10.0-35-generic
Generating grub configuration file ...
Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.
Found linux image: /boot/vmlinuz-4.10.0-42-generic
Found initrd image: /boot/initrd.img-4.10.0-42-generic
Found linux image: /boot/vmlinuz-4.10.0-40-generic
Found initrd image: /boot/initrd.img-4.10.0-40-generic
Found linux image: /boot/vmlinuz-4.10.0-38-generic
Found initrd image: /boot/initrd.img-4.10.0-38-generic
Found linux image: /boot/vmlinuz-4.10.0-37-generic
Found initrd image: /boot/initrd.img-4.10.0-37-generic
Found memtest86+ image: /memtest86+.elf
Found memtest86+ image: /memtest86+.bin
done
Removing linux-image-4.10.0-37-generic (4.10.0-37.41~16.04.1) ...
Examining /etc/kernel/prerm.d.
run-parts: executing /etc/kernel/prerm.d/dkms 4.10.0-37-generic /boot/vmlinuz-4.10.0-37-generic
dkms: removing: ndiswrapper 1.60 (4.10.0-37-generic) (x86_64)

-------- Uninstall Beginning --------
Module:  ndiswrapper
Version: 1.60
Kernel:  4.10.0-37-generic (x86_64)
-------------------------------------

Status: Before uninstall, this module version was ACTIVE on this kernel.

ndiswrapper.ko:
 - Uninstallation
   - Deleting from: /lib/modules/4.10.0-37-generic/updates/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.

depmod....

DKMS: uninstall completed.
dkms: removing: virtualbox 5.0.40 (4.10.0-37-generic) (x86_64)

-------- Uninstall Beginning --------
Module:  virtualbox
Version: 5.0.40
Kernel:  4.10.0-37-generic (x86_64)
-------------------------------------

Status: Before uninstall, this module version was ACTIVE on this kernel.

vboxdrv.ko:
 - Uninstallation
   - Deleting from: /lib/modules/4.10.0-37-generic/updates/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.


vboxnetadp.ko:
 - Uninstallation
   - Deleting from: /lib/modules/4.10.0-37-generic/updates/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.


vboxnetflt.ko:
 - Uninstallation
   - Deleting from: /lib/modules/4.10.0-37-generic/updates/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.


vboxpci.ko:
 - Uninstallation
   - Deleting from: /lib/modules/4.10.0-37-generic/updates/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.

depmod....

DKMS: uninstall completed.
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 4.10.0-37-generic /boot/vmlinuz-4.10.0-37-generic
update-initramfs: Deleting /boot/initrd.img-4.10.0-37-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 4.10.0-37-generic /boot/vmlinuz-4.10.0-37-generic
Generating grub configuration file ...
Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.
Found linux image: /boot/vmlinuz-4.10.0-42-generic
Found initrd image: /boot/initrd.img-4.10.0-42-generic
Found linux image: /boot/vmlinuz-4.10.0-40-generic
Found initrd image: /boot/initrd.img-4.10.0-40-generic
Found linux image: /boot/vmlinuz-4.10.0-38-generic
Found initrd image: /boot/initrd.img-4.10.0-38-generic
Found memtest86+ image: /memtest86+.elf
Found memtest86+ image: /memtest86+.bin
done
john@john-T420 ~ $ df -h /boot
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1       472M  178M  271M  40% /boot
john@john-T420 ~ $ sudo dpkg -l linux* | grep ^ii | awk '{ print $2 }'linux-base
linux-firmware
linux-headers-4.10.0-38
linux-headers-4.10.0-38-generic
linux-headers-4.10.0-40
linux-headers-4.10.0-40-generic
linux-headers-4.10.0-42
linux-headers-4.10.0-42-generic
linux-image-4.10.0-38-generic
linux-image-4.10.0-40-generic
linux-image-4.10.0-42-generic
linux-image-extra-4.10.0-38-generic
linux-image-extra-4.10.0-40-generic
linux-image-extra-4.10.0-42-generic
linux-libc-dev:amd64
linux-sound-base
linuxmint-keyring
john@john-T420 ~ $ 

User avatar
paulandrewanderson
Level 1
Level 1
Posts: 17
Joined: Fri Jul 08, 2016 10:57 am
Location: Des Moines, IA
Contact:

Still problems to clean up old kernels

Post by paulandrewanderson »

https://mintguide.org/system/622-purge- ... rnels.html
Bummer! I guess this is too old now; I'm on Mint 19.1-C (an Acer Aspire E 15, E5-576-392H). The sudo apt-get install -y bikeshed byobu installed OK, but when I ran the sudo purge-old-kernels I got: 0 upgraded, 0 newly installed, 0 to remove and 0 upgraded. Of course, none of that is true. I'm on Kernel 5.0.0-20, with -19, -17, -16, and -15 in the 5.0 kernel pile, plus I've got Kernel's 4.18 with a long list of it's respective upgrades from 13 thru 25, and also, K-4.15 with its own long list. From the (GUI) update manager, it shows them, but it will not load any of them into the Remove Old Kernels window to be removed; hence, why I came here via a G-search for a terminal way of removing these 38 extra kernels. The imgur is the relevant screenshot. https://imgur.com/9AaOpGz

User avatar
smurphos
Level 15
Level 15
Posts: 5608
Joined: Fri Sep 05, 2014 12:18 am
Location: Britisher
Contact:

Re: Still problems to clean up old kernels

Post by smurphos »

paulandrewanderson wrote:
Sat Jul 27, 2019 9:24 pm
The imgur is the relevant screenshot. https://imgur.com/9AaOpGz
None of the 4.15 kernels in that screenshot are actually installed so there are none to remove.

Here I've got 2 installed.
Image
And the one not in use is available to remove.
Image
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.

Post Reply

Return to “Software & Applications”