STIGUI
V-260477CAT II — Medium severitySV-260477r1044773_rule

Ubuntu 22.04 LTS must be configured so that the Advance Package Tool (APT) removes all software components after updated versions have been installed.

Rule version UBTU-22-214015 · STIG v2 · 2026-09-09

Discussion

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.

Check

Verify APT is configured to remove all software components after updated versions have been installed by using the following command:

     $ grep -i remove-unused /etc/apt/apt.conf.d/50unattended-upgrades 
     Unattended-Upgrade::Remove-Unused-Kernel-Packages "true"; 
     Unattended-Upgrade::Remove-Unused-Dependencies "true"; 

If "Unattended-Upgrade::Remove-Unused-Kernel-Packages" and "Unattended-Upgrade::Remove-Unused-Dependencies" are not set to "true", are commented out, or are missing, this is a finding.

Fix

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";

Identifiers

Group ID
V-260477
Group title
SRG-OS-000437-GPOS-00194
Rule ID
SV-260477r1044773_rule
Check ID
C-64206r1044771_chk
Fix ID
F-64114r1044772_fix