[kwlug-disc] Removing old Linux images on upgrade
Peter Melse
peter_melse at gto.net
Fri Dec 4 01:47:06 EST 2015
Sudo apt-get autoremove
Clears /boot well enough for me 99% of the time.
On Dec 3, 2015 10:48 AM, Khalid Baheyeldin <kb at 2bits.com> wrote:
>
> I mentioned this in passing during a previous discussion, but it warrants its own discussion.
>
> On Ubuntu, when a new Linux image (and headers) are installed, it automatically removes some of the old ones. This is helpful in keeping the /boot partition size down.
>
> Now, I am not a fan of making /boot be its own partition. I prefer to make it a directory under the root partition. However, there are cases where this is necessary, like when having some RAID configurations with drivers needed at a later stage.
>
> The side effect is when many hosting companies set the /boot to its own partition and to something small, e.g. 250MB or even 200MB.
>
> The behaviour I am looking for is exactly this:
>
> # aptitude full-upgrade
> The following NEW packages will be installed:
> linux-headers-3.13.0-71{a} linux-headers-3.13.0-71-generic{a} linux-image-3.13.0-71-generic
> The following packages will be REMOVED:
> linux-headers-3.2.0-94{u} linux-headers-3.2.0-94-generic{u}
> The following packages will be upgraded:
> linux-generic-lts-trusty linux-headers-generic-lts-trusty linux-image-generic-lts-trusty
> 3 packages upgraded, 3 newly installed, 2 to remove and 0 not upgraded.
> Need to get 0 B/66.5 MB of archives. After unpacking 207 MB will be used.
> Do you want to continue? [Y/n/?]
>
> As you can see, old images and headers are automatically removed, and if this worked reliably on all servers, this would take care of unwanted space depletion in the /boot partition.
>
> But often not, this does not work, and a full-upgrade fails because of lack of space, and I have to clean the partition manually.
>
> Any one knows why this sometimes works, but not others?
> --
> Khalid M. Baheyeldin
> 2bits.com, Inc.
> Fast Reliable Drupal
> Drupal optimization, development, customization and consulting.
> Simplicity is prerequisite for reliability. -- Edsger W.Dijkstra
> Simplicity is the ultimate sophistication. -- Leonardo da Vinci
> For every complex problem, there is an answer that is clear, simple, and wrong." -- H.L. Mencken
More information about the kwlug-disc
mailing list