Linux Survival Basics
See Which Packages Want Updates
You need to see pending package updates without changing the system.
Command
apt list --upgradable
What changed
Nothing changes. The command reads apt metadata and prints packages with newer candidate versions.
Danger
safe
When to use it
Use before maintenance windows, security patch review, or explaining why a host is behind.
When not to use it
Do not assume this refreshes repository metadata; apt update is a separate state-changing network operation.
Undo or recovery
No undo needed because the command is read-only.
Expected output
Apt rows showing package names, candidate versions, architectures, and installed versions.
demo script
Disposable terminal steps
apt list --upgradableapt list --upgradable 2>/dev/null | sed -n '2,$p'
simulated output
What it looks like
::fixture-ready::
$ apt list --upgradable
Listing... Done
curl/noble-updates 8.5.0-2ubuntu10.7 amd64 [upgradable from: 8.5.0-2ubuntu10.6]
openssl/noble-updates,noble-security 3.0.13-0ubuntu3.6 amd64 [upgradable from: 3.0.13-0ubuntu3.5]
nginx/noble-updates 1.24.0-2ubuntu7.4 amd64 [upgradable from: 1.24.0-2ubuntu7.3]
::exit-code::0
$ apt list --upgradable 2>/dev/null | sed -n '2,$p'
curl/noble-updates 8.5.0-2ubuntu10.7 amd64 [upgradable from: 8.5.0-2ubuntu10.6]
openssl/noble-updates,noble-security 3.0.13-0ubuntu3.6 amd64 [upgradable from: 3.0.13-0ubuntu3.5]
nginx/noble-updates 1.24.0-2ubuntu7.4 amd64 [upgradable from: 1.24.0-2ubuntu7.3]
::exit-code::0
YouTube Short
List updates first.
Do not start with upgrade. First list the packages that would move and capture the installed versions.
LinkedIn hook
Before you upgrade anything, list what would move.
Question: Do you review the upgradable list before running upgrades?
experiments
A/B tests to run
Metric: save_rate
A: List before upgrade.
B: What would apt change?