Unattended-upgrades and Update Manager use the patterns from the APT::VersionedKernelPackages list directly for finding kernel packages to remove while APT uses patterns by attaching version and flavor to them.
As a result in APT's script ".*-modules" becomes "^.*-modules-4\.15\.0-45-generic$":
...
for package in $(apt-config dump --no-empty --format '%v%n' 'APT::VersionedKernelPackages'); do
for kernel in $kernels; do echo " \"^${package}-${kernel}$\";"
done
...
In unattended-upgrades and update-manager ".*-modules" is used directly for matching and may false identify autoremovable packages as kernel-related ones and remove them (of just offer the removal in case of update-manager):
...
Removing unused kernel packages: extra-cmake-modules
marking extra-cmake-modules for removal
(Reading database ... 31149 files and directories currently installed.)
Removing extra-cmake-modules (5.44.0-0ubuntu1) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Packages that were successfully auto-removed: extra-cmake-modules
...
Unattended-upgrades and Update Manager use the patterns from the APT::VersionedK ernelPackages list directly for finding kernel packages to remove while APT uses patterns by attaching version and flavor to them.
As a result in APT's script ".*-modules" becomes "^.*-modules- 4\.15\. 0-45-generic$ ":
... KernelPackages' ); do
echo " \"^${package} -${kernel} $\";"
for package in $(apt-config dump --no-empty --format '%v%n' 'APT::Versioned
for kernel in $kernels; do
done
...
In unattended-upgrades and update-manager ".*-modules" is used directly for matching and may false identify autoremovable packages as kernel-related ones and remove them (of just offer the removal in case of update-manager):
...
Removing unused kernel packages: extra-cmake-modules
marking extra-cmake-modules for removal
(Reading database ... 31149 files and directories currently installed.)
Removing extra-cmake-modules (5.44.0-0ubuntu1) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Packages that were successfully auto-removed: extra-cmake-modules
...