NixOS must remove all software components after updated versions have been installed.
An XCCDF Rule
Description
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.
- ID
- SV-268162r1039374_rule
- Version
- ANIX-00-001680
- Severity
- Medium
- References
- Updated
Remediation Templates
A Manual Procedure
After updating NixOS (either via "cd /etc/nixos; sudo nix flake update; sudo nixos-rebuild switch" or "sudo nixos-rebuild switch –upgrade"), reboot the system to ensure all running software comes from the current active NixOS generation.
Edit /etc/nixos/configuration.nix and remove any references to outdated versions of nixpkgs.