Back to commands

Linux Survival Basics

Read-only

See Which Packages Want Updates

You need to see pending package updates without changing the system.

Command

apt list --upgradable

Before you run this

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

When not to use it: Do not assume this refreshes repository metadata; apt update is a separate state-changing network operation.

Expected output

Apt rows showing package names, candidate versions, architectures, and installed versions.

System impact

Read-only. Nothing changes. The command reads apt metadata and prints packages with newer candidate versions.

Recovery / rollback: no state is changed.

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.

next steps

Related commands

Linux Survival Basics Read-only

List Installed Package Versions

A package inventory beats memory when a server is drifting.

dpkg-query -W -f='${Package}\t${Version}\t${Architecture}\n' | sort
Linux Survival Basics Read-only

Find the Largest Installed Packages

Disk cleanup starts with evidence, not random package removal.

dpkg-query -W -f='${Installed-Size}\t${Package}\n' | sort -nr | head -20
Linux Survival Basics Read-only

List Installed Debian Kernels

Know installed kernels before cleanup.

dpkg -l 'linux-image*' | awk '/^ii/{print $2,$3}'
Linux Survival Basics Can be slow

Find Running Package Manager Processes

A package lock is usually a symptom, not the first thing to delete.

ps -ef | grep -E 'apt|dpkg|dnf|yum|pacman' | grep -v grep
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.