$ dpkg -l linux-image-5.4.0-121-generic
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 linux-image-5.4.0-121-generic 5.4.0-121.137~18.04.1 i386 Linux kernel image for version 5.4.0 on 32 bit x86 SMP
$ sudo apt autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
For some reason the test case worked even with apt 1.6.14 as the following shows:
$ apt policy apt mirrors. nic.funet. fi/ubuntu bionic- proposed/ main i386 Packages mirrors. nic.funet. fi/ubuntu bionic-updates/main i386 Packages dpkg/status 6.12ubuntu0. 2 500 mirrors. nic.funet. fi/ubuntu bionic- security/ main i386 Packages mirrors. nic.funet. fi/ubuntu bionic/main i386 Packages
apt:
Installed: 1.6.14
Candidate: 1.6.14
Version table:
1.6.16 400
400 http://
*** 1.6.14 500
500 http://
100 /var/lib/
1.
500 http://
1.6.1 500
500 http://
$ grep '\^linux-image' /etc/apt/ apt.conf. d/01autoremove- kernels image-5\ .4\.0-122- generic$ "; image-5\ .4\.0-123- generic$ "; image-extra- 5\.4\.0- 122-generic$ "; image-extra- 5\.4\.0- 123-generic$ "; image-unsigned- 5\.4\.0- 122-generic$ "; image-unsigned- 5\.4\.0- 123-generic$ ";
"^linux-
"^linux-
"^linux-
"^linux-
"^linux-
"^linux-
$ uname -r
5.4.0-121-generic
$ dpkg -l linux-image- 5.4.0-121- generic Unknown/ Install/ Remove/ Purge/Hold Not/Inst/ Conf-files/ Unpacked/ halF-conf/ Half-inst/ trig-aWait/ Trig-pend /Reinst- required (Status,Err: uppercase=bad) ======= ======= ======= ======= ==-==== ======= ======= ===-=== ======= ======= ====-== ======= ======= ======= ======= ======= ======= ======= ======= ======= ====== 5.4.0-121- generic 5.4.0-121. 137~18. 04.1 i386 Linux kernel image for version 5.4.0 on 32 bit x86 SMP
Desired=
| Status=
|/ Err?=(none)
||/ Name Version Architecture Description
+++-===
ii linux-image-
$ apt-cache rdepends --installed --recurse linux-image- 5.4.0-121- generic 5.4.0-121- generic modules- extra-5. 4.0-121- generic extra-5. 4.0-121- generic
linux-image-
Reverse Depends:
|linux-
linux-modules-
Reverse Depends:
$ apt-mark showauto linux-image- 5.4.0-121- generic linux-modules- extra-5. 4.0-121- generic 5.4.0-121- generic extra-5. 4.0-121- generic
linux-image-
linux-modules-
$ sudo apt autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.