Information
The operating system must be configured so that the Advance Package Tool (APT) removes all software components after updated versions have been installed.
GROUP ID: V-270773
RULE ID: SV-270773r1066808
Previous versions of software components that are not removed from the information system after updates have been installed may be exploited by adversaries. Some information technology products may remove older versions of software automatically from the information system.
Solution
Configure APT to remove all software components after updated versions have been installed.
Add or modify the following lines in the "/etc/apt/apt.conf.d/50unattended-upgrades" file:
Unattended-Upgrade::Remove-Unused-Kernel-Packages "true";
Unattended-Upgrade::Remove-Unused-Dependencies "true";