Which command lists all currently installed packages using RPM package management?

Prepare for the LPI 101-500 Certification Exam. Utilize flashcards, navigate multiple choice questions, and benefit from hints and explanations. Begin your Linux certification journey today!

The command that correctly lists all currently installed packages using RPM package management is "rpm --query --all."

The RPM (Red Hat Package Manager) tool is designed for managing packages on systems that use the RPM package format, such as Red Hat, CentOS, and Fedora. The "rpm" command has a variety of options, and using the "--query" option allows you to query the RPM database for information about installed packages. The "--all" flag specifies that you want to see all packages, not just a specific package or filter.

In contrast, while "yum" is a higher-level package management tool built on top of RPM that offers additional functionality such as dependency resolution and repository management, some of the options provided in the other choices are not accurate. For instance, "yum --list --installed" is a valid command to list installed packages, but it does not use RPM directly and focuses more on the repository management that Yum handles. Similarly, the option "rpm --list --installed" does not exist; “--list” is not a recognized option under the "rpm" command set. Thus, "rpm --query --all" is the most precise and accurate command for listing installed packages directly through RPM without any additional abstractions

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy