I was doing apt upgrade
on my server, that usually goes quick and doesn't break anything.
Not this time.
Here's what I got on console:
Setting up linux-firmware (1.173.20) ...
update-initramfs: Generating /boot/initrd.img-4.15.0-140-generic
update-initramfs: Generating /boot/initrd.img-4.15.0-139-generic
update-initramfs: Generating /boot/initrd.img-4.15.0-122-generic
update-initramfs: Generating /boot/initrd.img-4.13.0-45-generic
update-initramfs: Generating /boot/initrd.img-4.13.0-43-generic
update-initramfs: Generating /boot/initrd.img-4.13.0-41-generic
update-initramfs: Generating /boot/initrd.img-4.13.0-39-generic
update-initramfs: Generating /boot/initrd.img-4.13.0-38-generic
update-initramfs: Generating /boot/initrd.img-4.13.0-37-generic
This went very, very slow and choked my server for like 5 minutes. Very, very bad. Is all that necessary? It looks like those files are generated for many different versions. Why? Do I need multiple versions? I don't want them. I want one. The latest. And I definitely don't want the server to hang for 5 minutes on update.
So - what can I do to make things faster and get one "generating..." instead of 9 or more?
UPDATE:
I'm after apt autoremove
and purge-old-kernels
, anyway...
apt-mark showmanual | grep linux
console-setup-linux
libselinux1
linux-base
linux-cloud-tools-4.13.0-37
linux-cloud-tools-4.13.0-37-generic
linux-cloud-tools-4.13.0-38
linux-cloud-tools-4.13.0-38-generic
linux-cloud-tools-4.13.0-39
linux-cloud-tools-4.13.0-39-generic
linux-cloud-tools-4.13.0-41
linux-cloud-tools-4.13.0-41-generic
linux-cloud-tools-4.13.0-43
linux-cloud-tools-4.13.0-43-generic
linux-cloud-tools-4.13.0-45
linux-cloud-tools-4.13.0-45-generic
linux-cloud-tools-virtual
linux-generic
linux-image-extra-4.13.0-37-generic
linux-image-extra-4.13.0-38-generic
linux-image-extra-4.13.0-39-generic
linux-image-extra-4.13.0-41-generic
linux-image-extra-4.13.0-43-generic
linux-image-extra-4.13.0-45-generic
linux-virtual
util-linux
walinuxagent