4

I noticed today that my linux images were stacking up on the hard drive (Ubuntu Server 12.04). I freed up a couple of GB in clearing the majority of them off.

When I looked into this there is a script in place to protect the current version (current running, most recent, second most recent). This is run automatically each time a new linux image is added through apt: /etc/kernel/postinst.d/apt-auto-removal. It's effect is to prevent the most relevant images from being removed automatically through apt.

However this did not explain the number of images I had filling up my /boot partition. This appears due to each linux-image-*-generic being marked as manual in apt so that you need to use apt-mark auto linux-image-3.2.0-32-generic before it will be identified for removal.

Is there any simple way to change this behavior so that kernels are only retained by the logic in /etc/kernel/postinst.d/apt-auto-removal? Is it inadvisable to try?

2
  • hmm, it doesn't do that on 13.04 desktop... might be fixed in 13.04 and/or is just a thing with the server version. Jun 6, 2013 at 14:12
  • If memory serves me right, is a protection that kernels don't get removed automatically, because if something goes wrong with a new kernel, you could use the previous one.
    – Braiam
    Aug 14, 2013 at 0:08

1 Answer 1

2

Probably this behavior changed later on. Right now the kernels are marked in Auto and removed when they start to pollute. This is to start removing them and don't fill up the /boot partition.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .