Tested 1.1ubuntu1.18.04.7~16.04.2 on Xenial.
root@x-uu-lp-1260041:~# yes no |apt-get autoremove Reading package lists... Done Building dependency tree Reading state information... Done The following packages will be REMOVED: linux-image-4.8.0-53-generic linux-image-extra-4.8.0-53-generic 0 upgraded, 0 newly installed, 2 to remove and 10 not upgraded. After this operation, 234 MB disk space will be freed. Do you want to continue? [Y/n] Abort. root@x-uu-lp-1260041:~# ls /var/run/reboot* ls: cannot access '/var/run/reboot*': No such file or directory root@x-uu-lp-1260041:~# apt-get autoremove Reading package lists... Done Building dependency tree Reading state information... Done The following packages will be REMOVED: linux-image-4.8.0-53-generic linux-image-extra-4.8.0-53-generic 0 upgraded, 0 newly installed, 2 to remove and 10 not upgraded. After this operation, 234 MB disk space will be freed. Do you want to continue? [Y/n] (Reading database ... 53554 files and directories currently installed.) Removing linux-image-extra-4.8.0-53-generic (4.8.0-53.56~16.04.1) ... run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.8.0-53-generic /boot/vmlinuz-4.8.0-53-generic run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.8.0-53-generic /boot/vmlinuz-4.8.0-53-generic update-initramfs: Generating /boot/initrd.img-4.8.0-53-generic W: mdadm: /etc/mdadm/mdadm.conf defines no arrays. run-parts: executing /etc/kernel/postinst.d/unattended-upgrades 4.8.0-53-generic /boot/vmlinuz-4.8.0-53-generic run-parts: executing /etc/kernel/postinst.d/update-notifier 4.8.0-53-generic /boot/vmlinuz-4.8.0-53-generic run-parts: executing /etc/kernel/postinst.d/zz-update-grub 4.8.0-53-generic /boot/vmlinuz-4.8.0-53-generic Removing linux-image-4.8.0-53-generic (4.8.0-53.56~16.04.1) ... Examining /etc/kernel/postrm.d . run-parts: executing /etc/kernel/postrm.d/initramfs-tools 4.8.0-53-generic /boot/vmlinuz-4.8.0-53-generic update-initramfs: Deleting /boot/initrd.img-4.8.0-53-generic run-parts: executing /etc/kernel/postrm.d/zz-update-grub 4.8.0-53-generic /boot/vmlinuz-4.8.0-53-generic root@x-uu-lp-1260041:~# ls /var/run/reboot* ls: cannot access '/var/run/reboot*': No such file or directory root@x-uu-lp-1260041:~# dpkg -l unattended-upgrades | cat Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ Name Version Architecture Description +++-===================-==========================-============-=========================================== ii unattended-upgrades 1.1ubuntu1.18.04.7~16.04.2 all automatic installation of security upgrades ** Tags removed: verification-needed-xenial ** Tags added: verification-done-xenial ** Tags removed: verification-needed ** Tags added: verification-done -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to unattended-upgrades in Ubuntu. https://bugs.launchpad.net/bugs/1458204 Title: removing kernels should not require a restart afterward Status in unattended-upgrades package in Ubuntu: Fix Released Status in update-notifier package in Ubuntu: Fix Released Status in unattended-upgrades source package in Xenial: Fix Committed Status in update-notifier source package in Xenial: Fix Released Status in unattended-upgrades source package in Artful: Won't Fix Status in update-notifier source package in Artful: Won't Fix Bug description: [Impact] The rationale behind the SRU to Xenial is that with latest unattended- upgrades SRU it starts removing unused kernels, but all older kernels are not removed in a single run. With update-notifier and u-u not fixed they place /var/run/reboot-required asking for a reboot when it is not needed. [Test Case] 1. Perform a kernel upgrade normally via "apt-get dist-upgrade". 2. Reboot. 3. Run "apt-get autoremove" to delete the old kernel packages. 4. "System Notification Helper" now reports that the computer requires a reboot. The "autoremove" operation shouldn't require a reboot, logically speaking, because it's just removing files that are unused by the OS. [ Regression Potential ] If the check for skipping placing the /var/run/reboot-required file is too broad it may make kernel upgrades fail to ask for reboot. The fix changes a hook called by maintainer scripts and a failure in the hook can make kernel package installations fail. The fix is simple and was tested in several releases thus regressing in these ways is unlikely. [ Original Bug Text ] ProblemType: Bug DistroRelease: Ubuntu 14.04 Package: apt 1.0.1ubuntu2.7 ProcVersionSignature: Ubuntu 3.13.0-53.89-generic 3.13.11-ckt19 Uname: Linux 3.13.0-53-generic x86_64 ApportVersion: 2.14.1-0ubuntu3.11 Architecture: amd64 CurrentDesktop: KDE Date: Sat May 23 12:47:15 2015 InstallationDate: Installed on 2013-08-31 (629 days ago) InstallationMedia: Ubuntu 13.04 "Raring Ringtail" - Release amd64 (20130424) SourcePackage: apt UpgradeStatus: Upgraded to trusty on 2014-04-26 (391 days ago) --- ApportVersion: 2.14.1-0ubuntu3.11 Architecture: amd64 CurrentDesktop: KDE DistroRelease: Ubuntu 14.04 HibernationDevice: RESUME=UUID=66f11ff7-00bb-4452-9168-003cf9078308 InstallationDate: Installed on 2013-08-31 (632 days ago) InstallationMedia: Ubuntu 13.04 "Raring Ringtail" - Release amd64 (20130424) MachineType: System manufacturer System Product Name Package: linux (not installed) ProcFB: 0 nouveaufb ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.13.0-53-generic root=UUID=02741f1f-8107-4a0f-b9a6-31ef470b1389 ro libata.force=noncq quiet splash vt.handoff=7 ProcVersionSignature: Ubuntu 3.13.0-53.89-generic 3.13.11-ckt19 RelatedPackageVersions: linux-restricted-modules-3.13.0-53-generic N/A linux-backports-modules-3.13.0-53-generic N/A linux-firmware 1.127.12 RfKill: Tags: trusty Uname: Linux 3.13.0-53-generic x86_64 UpgradeStatus: Upgraded to trusty on 2014-04-26 (395 days ago) UserGroups: adm cdrom dialout dip fuse lightdm lpadmin plugdev sambashare sudo WifiSyslog: _MarkForUpload: True dmi.bios.date: 08/12/2013 dmi.bios.vendor: American Megatrends Inc. dmi.bios.version: 4210 dmi.board.asset.tag: To be filled by O.E.M. dmi.board.name: P9X79 dmi.board.vendor: ASUSTeK COMPUTER INC. dmi.board.version: Rev 1.xx dmi.chassis.asset.tag: Asset-1234567890 dmi.chassis.type: 3 dmi.chassis.vendor: Chassis Manufacture dmi.chassis.version: Chassis Version dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvr4210:bd08/12/2013:svnSystemmanufacturer:pnSystemProductName:pvrSystemVersion:rvnASUSTeKCOMPUTERINC.:rnP9X79:rvrRev1.xx:cvnChassisManufacture:ct3:cvrChassisVersion: dmi.product.name: System Product Name dmi.product.version: System Version dmi.sys.vendor: System manufacturer To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/unattended-upgrades/+bug/1458204/+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