I run an alias to do my updating and it's this: sudo apt-get update && sudo apt-get upgrade && sudo apt-get autoclean When the update happens and there is a kernel waiting to be dist-upgraded I believe the /etc/apt/apt.conf.d/01autoremovekernels file has been manipulated to include parts of the wrong kernel Then when autoclean runs it deletes parts of that kernel rendering it useless. Thus when a reboot happens, the wrong kernel is wanting to be deleted, again triggering /etc/kernel/postinst.d/apt-auto-removal and you end up with one kernel. /etc/kernel/postinst.d/apt-auto-removal should not be triggered as many times as it is. As I've mentioned a few times after rebooting and purging kernels it causes you to have just one.
I took out the autoremove part and if I delete the oldest of the 3 kernels before the first reboot, it gets it right. But, when you reboot before purging the 3rd kernel it will keep on until you have one. ** Tags added: xenial -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to apt in Ubuntu. https://bugs.launchpad.net/bugs/1440608 Title: /etc/kernel/postinst.d/apt-auto-removal wants to remove all kernels except the latest one Status in apt package in Ubuntu: Confirmed Bug description: After installing a 3rd kernel currently 3.19.0-12-generic, the /etc/apt/apt.conf.d/01autoremove-kernels file looks normal listing the 3.19.0-11-generic and 3.19.0-12-generic with 3.19.0-10-generic listed to be autoremoved. But once autoremove is completed the machine requests to be rebooted and at that time the /etc/apt/apt.conf.d /01autoremove-kernels file lists the 3.19.0-12-generic and 3.19.0-10-generic kernels. So upon rebooting the 3.19.0-11-generic is requested to be autoremoved leaving only one kernel the latest one 3.19.0-12-generic. ProblemType: Bug DistroRelease: Ubuntu 15.04 Package: apt 1.0.9.7ubuntu3 ProcVersionSignature: Ubuntu 3.19.0-12.12-generic 3.19.3 Uname: Linux 3.19.0-12-generic x86_64 NonfreeKernelModules: nvidia ApportVersion: 2.17-0ubuntu1 Architecture: amd64 CurrentDesktop: MATE Date: Sun Apr 5 17:03:01 2015 InstallationDate: Installed on 2015-04-02 (3 days ago) InstallationMedia: Ubuntu-MATE 15.04 "Vivid Vervet" - Beta amd64 (20150401) SourcePackage: apt UpgradeStatus: No upgrade log present (probably fresh install) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1440608/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp