Pcornel
Security · Hardening

Remove Unused Software

Cheat sheet · https://pcornel.dk/topic.php?topic=4844

Back to the Topic

Answer

Removing Unused Software reduces exploitable code, packages, libraries, agents and maintenance burden by eliminating components not required for the approved system role, including dependencies, residual services and stale artifacts.

Remember

  • Application not launched ≠ package or vulnerable library not present.
  • Package removed ≠ configuration, credentials, services and dependencies cleaned safely.
  • Desired baseline ≠ deployed, effective and persistent runtime state.
  • Compliant score ≠ secure workload, correct recovery or acceptable residual risk.

First checks

  • dpkg -l | wc -l; rpm -qa | wc -l — package count
  • Get-Package | ft Name,Version — Windows
  • apt-mark showmanual — manually installed

Verify in this order

installed software → required only → removed rest

Where it usually breaks

First mismatch in asset inventory → applicable baseline/finding → risk/exception decision → remediation → verification → compliance/reporting; preserve identity/policy/pre-state before mutation.

Hardening → Remove Unused Software proof map

BoundaryEstablishDoes not establish
ScopeExact platform/version, role, threat model, required functions and approved profileGeneric benchmark selection does not prove suitability
Effective stateDesired source, deployment, precedence and loaded/runtime valueFile, policy or compliance result alone does not prove enforcement
BehaviorCorrelated allowed/denied test, events and protected workload resultOne blocked action does not prove the intended control caused it
AssurancePersistence, drift monitoring, exception state, recovery and regressionOne-time hardening does not prove maintained secure state

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=4844

Confirmation

Confirm action

Continue?