nerdexam
Linux_Foundation

LFCS · Question #817

Which of the following commands lists all currently installed packages when using RPM package management?

The correct answer is C. rpm --query --all. To list all currently installed packages using the RPM package management system, the rpm command with the query (-q) and all (-a) options is used.

Submitted by yuki_2020· Apr 18, 2026Essential Commands

Question

Which of the following commands lists all currently installed packages when using RPM package management?

Options

  • Ayum --query --all
  • Byum --list --installed
  • Crpm --query --all
  • Drpm --list installed

How the community answered

(53 responses)
  • A
    2% (1)
  • B
    2% (1)
  • C
    92% (49)
  • D
    4% (2)

Why each option

To list all currently installed packages using the RPM package management system, the `rpm` command with the query (`-q`) and all (`-a`) options is used.

Ayum --query --all

While `yum` can list installed packages (e.g., `yum list installed`), the `--query` and `--all` options are specific to the `rpm` command, not `yum`.

Byum --list --installed

The `yum --list --installed` syntax is incorrect; the correct `yum` command to list installed packages is `yum list installed`.

Crpm --query --allCorrect

The `rpm --query --all` command, often shortened to `rpm -qa`, is the correct and standard way to query and list all packages that have been installed on the system using the RPM Package Manager.

Drpm --list installed

The `rpm --list installed` syntax is incorrect for listing all installed packages; the correct options are `--query` or `-q` combined with `--all` or `-a`.

Concept tested: Listing installed RPM packages

Source: https://man7.org/linux/man-pages/man8/rpm.8.html

Topics

#RPM#Package Management#Query Packages#Essential Commands

Community Discussion

No community discussion yet for this question.

Full LFCS Practice