Installed a few linux packages, marked them auto-installed, ran /etc/kernel/postinst.d/apt-auto-removal , then booted to a old kernel.
Apt would have removed it, but u-u did not. (The -34- kernel.)
ubuntu@ubuntu-Standard-PC-i440FX-PIIX-1996:~$ uname -a
Linux ubuntu-Standard-PC-i440FX-PIIX-1996 4.15.0-34-generic #37~16.04.1-Ubuntu SMP Tue Aug 28 10:44:06 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
ubuntu@ubuntu-Standard-PC-i440FX-PIIX-1996:~$ yes no | apt autoremove
E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?
ubuntu@ubuntu-Standard-PC-i440FX-PIIX-1996:~$ yes no | sudo apt autoremove
[sudo] password for ubuntu:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
linux-image-4.15.0-34-generic linux-image-4.15.0-36-generic linux-image-4.15.0-38-generic linux-modules-4.15.0-34-generic linux-modules-4.15.0-36-generic
linux-modules-4.15.0-38-generic
0 upgraded, 0 newly installed, 6 to remove and 9 not upgraded.
After this operation, 223 MB disk space will be freed.
Do you want to continue? [Y/n] Abort.
ubuntu@ubuntu-Standard-PC-i440FX-PIIX-1996:~$ sudo unattended-upgrade --dry-run --verbose
Initial blacklisted packages:
Initial whitelisted packages:
Starting unattended upgrades script
Allowed origins are: o=Ubuntu,a=xenial, o=Ubuntu,a=xenial-security, o=UbuntuESM,a=xenial
Removing unused kernel packages: linux-modules-4.15.0-36-generic linux-image-4.15.0-36-generic linux-modules-4.15.0-38-generic linux-image-4.15.0-38-generic
Keeping auto-removable linux-modules-4.15.0-36-generic package(s) because it would also remove the following packages which should be kept in this step: libpam-systemd libsmbclient libsystemd0 libudev1 libwbclient0 samba-libs systemd systemd-sysv udev
Packages that were successfully auto-removed:
Packages that are kept back: linux-modules-4.15.0-36-generic
ubuntu@ubuntu-Standard-PC-i440FX-PIIX-1996:~$ 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
Verified 1.1ubuntu1. 18.04.7~ 16.04.2 on Xenial.
Installed a few linux packages, marked them auto-installed, ran /etc/kernel/ postinst. d/apt-auto- removal , then booted to a old kernel.
Apt would have removed it, but u-u did not. (The -34- kernel.)
ubuntu@ ubuntu- Standard- PC-i440FX- PIIX-1996: ~$ uname -a Standard- PC-i440FX- PIIX-1996 4.15.0-34-generic #37~16.04.1-Ubuntu SMP Tue Aug 28 10:44:06 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux ubuntu- Standard- PC-i440FX- PIIX-1996: ~$ yes no | apt autoremove dpkg/lock- frontend - open (13: Permission denied) dpkg/lock- frontend) , are you root? ubuntu- Standard- PC-i440FX- PIIX-1996: ~$ yes no | sudo apt autoremove image-4. 15.0-34- generic linux-image- 4.15.0- 36-generic linux-image- 4.15.0- 38-generic linux-modules- 4.15.0- 34-generic linux-modules- 4.15.0- 36-generic modules- 4.15.0- 38-generic ubuntu- Standard- PC-i440FX- PIIX-1996: ~$ sudo unattended-upgrade --dry-run --verbose a=xenial- security, o=UbuntuESM, a=xenial 4.15.0- 36-generic linux-image- 4.15.0- 36-generic linux-modules- 4.15.0- 38-generic linux-image- 4.15.0- 38-generic 4.15.0- 36-generic package(s) because it would also remove the following packages which should be kept in this step: libpam-systemd libsmbclient libsystemd0 libudev1 libwbclient0 samba-libs systemd systemd-sysv udev 4.15.0- 36-generic ubuntu- Standard- PC-i440FX- PIIX-1996: ~$ dpkg -l unattended-upgrades | cat Unknown/ Install/ Remove/ Purge/Hold Not/Inst/ Conf-files/ Unpacked/ halF-conf/ Half-inst/ trig-aWait/ Trig-pend /Reinst- required (Status,Err: uppercase=bad) ======= ======= ==-==== ======= ======= ======= =-===== ======= -====== ======= ======= ======= ======= ======= == 18.04.7~ 16.04.2 all automatic installation of security upgrades
Linux ubuntu-
ubuntu@
E: Could not open lock file /var/lib/
E: Unable to acquire the dpkg frontend lock (/var/lib/
ubuntu@
[sudo] password for ubuntu:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
linux-
linux-
0 upgraded, 0 newly installed, 6 to remove and 9 not upgraded.
After this operation, 223 MB disk space will be freed.
Do you want to continue? [Y/n] Abort.
ubuntu@
Initial blacklisted packages:
Initial whitelisted packages:
Starting unattended upgrades script
Allowed origins are: o=Ubuntu,a=xenial, o=Ubuntu,
Removing unused kernel packages: linux-modules-
Keeping auto-removable linux-modules-
Packages that were successfully auto-removed:
Packages that are kept back: linux-modules-
ubuntu@
Desired=
| Status=
|/ Err?=(none)
||/ Name Version Architecture Description
+++-===
ii unattended-upgrades 1.1ubuntu1.