Courseiva
easyMultiple Choice

XK0-006 Practice Question: Verify which RPM packages are installed on a Red…

An administrator wants to verify which RPM packages are installed on a Red Hat Enterprise Linux system. Which command displays that information?

⚠ Common exam trap

The trap here is that candidates familiar with Debian-based systems might choose `dpkg -l` or `apt list --installed`, while those who use yum daily might pick `yum list installed` because it works, but the exam specifically tests knowledge of the native RPM command `rpm -qa` for direct package database queries.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

rpm -qa

The `rpm -qa` command queries the RPM database and lists all installed packages on a Red Hat Enterprise Linux system. The `-q` flag enables query mode, and `-a` specifies all packages, making it the correct tool for this task.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    dpkg -l

    Why it's wrong here

    dpkg -l reads Debian's package database and has no access to RPM metadata on Red Hat Enterprise Linux. It is tempting because dpkg -l is the correct choice when listing installed packages on Debian or Ubuntu systems, where it queries the dpkg status file.

  • ✗

    apt list --installed

    Why it's wrong here

    apt is Debian and Ubuntu's package manager and cannot read the RPM database on Red Hat Enterprise Linux. It is tempting because apt list --installed is the correct choice when verifying installed packages on a Debian-based distribution, where dpkg underpins the package database.

  • ✓

    rpm -qa

    Why this is correct

    The -q flag queries the RPM database and -a selects all installed packages, so rpm -qa lists every installed package name and version. This reads the local Berkeley DB/rpmdb metadata directly, requiring no repository or network access.

  • ✗

    yum list installed

    Why it's wrong here

    yum can list installed packages but rpm -qa is more direct for package query.

About these practice questions

This XK0-006 question is part of Courseiva's 781-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This XK0-006 practice question is part of Courseiva's free CompTIA certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the XK0-006 exam.