Back to commands

Cybersecurity Triage

Dry run / preview

Dry-Run Unattended Security Upgrades

You need to inspect what unattended-upgrades would select without installing packages.

Command

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

Before you run this

System impact: Preview only. Still verify source and destination paths before running the real command.

When not to use it: Do not run without --dry-run unless you intend to perform unattended package upgrades.

Expected output

A dry-run section listing packages that unattended-upgrades would upgrade.

System impact

Dry run / preview. Nothing changes. unattended-upgrade runs in dry-run mode and sed extracts the selected package summary.

Recovery / rollback: no state is changed.

When to use it

Use when checking automatic patch coverage, security origins, or why a package was not auto-selected.

When not to use it

Do not run without --dry-run unless you intend to perform unattended package upgrades.

next steps

Related commands

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

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

Prove a Package Candidate Is From Security

The package name is not enough; the candidate repository tells the patch story.

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

Inspect Container Environment Names

Check what environment variables exist without printing their secret values.

docker inspect --format '{{range .Config.Env}}{{println .}}{{end}}' api | sed 's/=.*$/=<redacted>/'
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.