CompTIA Linux+ (XK0-006)System ManagementEasy

A technician on a Debian-based system wants to see a list of all packages that have available updates without actually installing them. Which command should be used?

  1. Aapt list --upgradable
  2. Bapt autoremove
  3. Cdpkg -l
  4. Dapt-get remove
Show answer & explanation

Correct answer: A. apt list --upgradable

'apt list --upgradable' displays packages with newer versions available in the repositories, without installing anything. The other commands either remove packages, list all installed packages, or clean unused dependencies.

Why the other options are wrong

  • B. Removes automatically installed packages no longer needed.
  • C. Lists all installed packages, not just those with updates.
  • D. Removes a specified package, not related to checking updates.

apt list --upgradable

An APT command that shows which installed packages have newer versions available in configured repositories.

  • Run 'apt update' first to refresh package indexes
  • Does not install or modify packages
  • Complementary to 'apt upgrade' which performs the update

Memory trick: List before you leap — check upgradable before upgrading

More System Management questions