Description
A minimal installation contains only what the role of the system requires: no graphical
environment on a server, no compiler or debugging tools on a production host, no tool installed
"just in case". Ubuntu makes it easier with the minimized server installation and minimal cloud
images, and by tracking packages installed only as dependencies so that apt-get autoremove
can remove them. Snaps are packages too: they count as much as the .deb packages.
Rationale
Each package is attack surface: its vulnerabilities, its services and its setuid binaries. Compilers, debuggers and network tools also help an attacker who got a foothold. Fewer packages also mean fewer updates and a simpler review of the system.
Impact
Removing a package that an application relies on breaks it. Review before removing, and test on a non-production system first.
Audit
- List the packages installed on purpose with
apt-mark showmanual, and check that each one is needed by the role of the system. - Run
apt-get -s autoremove: it lists dependencies that are no longer needed. - Look for packages that rarely belong on a server: graphical environment
(
dpkg -l 'xserver-xorg*' 'gnome*' 'kde*'), compilers and build tools (gcc,make,build-essential), debuggers (gdb,strace), network tools (nmap,netcat*,tcpdump), unused interpreters. - Run
snap listand check that each snap is needed (on a server, often none butlxdif containers are used). - Check that
apt-config dump APT::Install-Recommendsmatches the policy of the organisation.
Remediation
- Remove each unneeded package with
apt-get purge <package>, after checking withapt-get -s purge <package>what else would be removed. - Run
apt-get autoremove --purgeto remove the dependencies left behind, andsnap remove --purge <snap>for each unneeded snap. - For new systems, start from a minimal installation (the "Ubuntu Server (minimized)" choice of the installer, or a minimal cloud image) and add packages for the role only.
- Write down the list of packages expected for each role, so drifts can be spotted.
References
- ANSSI-BP-028 v2.0 - Recommandations de configuration d'un système GNU/Linux (R58) ANSSI, guide, accessed 2026-10-19
- apt-mark(8), Ubuntu manual pages Canonical, vendor-doc, accessed 2026-10-19
Mappings
| Framework | ID | Relation |
|---|---|---|
| ANSSI-BP-028 - Recommandations de configuration d'un système GNU/Linux2.0 | R58 | equivalent |
| NIST SP 800-53 Rev. 55.1.1 | CM-7 | related |
How this control relates to the other framework's: equivalent, stricter, looser, partial or related.
Related controls
- related
CB-UBU-PKG-011Do not install recommended and suggested packages automatically
People and lifecycle
| Authors |
|
| Introduced in | v0.1.0 |
| Created, updated | 2026-10-19, 2026-10-19 |
| Translations | fr |