Back to commands

Cybersecurity Triage

Read-only

Prove a Package Candidate Is From Security

A package is upgradable and you need to confirm whether the candidate version comes from the security pocket.

Command

apt-cache policy openssl | sed -n '/Installed:/p;/Candidate:/p;/security/p'

Before you run this

System impact: Read-only. Low when scoped to the shown target.

When not to use it: Do not use it to install the package; this is only metadata inspection.

Expected output

Installed and candidate versions plus a security repository line for the candidate.

System impact

Read-only. Nothing changes. apt-cache reads local apt metadata and sed extracts the version and security-origin lines.

Recovery / rollback: no state is changed.

When to use it

Use when documenting why a specific package is being patched or when comparing update and security pockets.

When not to use it

Do not use it to install the package; this is only metadata inspection.

next steps

Related commands

Cybersecurity Triage Dry run

Simulate Security Package Upgrades

Security patch triage starts by seeing what apt would change, without changing it.

apt-get -s upgrade | awk '/^Inst/ && /security/ {print}'
Cybersecurity Triage Read-only

Find Held Packages Blocking Patches

A held package can quietly keep a security update out of production.

apt-mark showhold | sed 's/^/held: /'
Cybersecurity Triage Dry run

Dry-Run Unattended Security Upgrades

Unattended upgrades can explain what they would patch before they patch it.

unattended-upgrade --dry-run --debug 2>&1 | sed -n '/Packages that will be upgraded:/,/^$/p'
Study mapping

Use this as independent command practice: read the notes, predict the output, then compare it with the example before using a real shell.

  • LPIC-1 style command-line practice
  • LFCS style performance-task practice
  • Linux+ style troubleshooting review

Independent study support only. No affiliation, endorsement, exam dumps, or real exam questions.