nerdexam
LPI

010-100 · Question #57

You want to examine the changelog for the installed package postfix. Which command will display the changelog?

The correct answer is D. rpm -q --changelog postfix. The rpm command provides a --changelog option to display the changelog of an installed package when combined with the query flag.

The Power of the Command Line

Question

You want to examine the changelog for the installed package postfix. Which command will display the changelog?

Options

  • Arpm -Vc postfix
  • Brpm -qpil postfix
  • Crpm --changelogpostfix
  • Drpm -q --changelog postfix
  • Erpm -qa --changelog postfix

How the community answered

(33 responses)
  • A
    3% (1)
  • B
    3% (1)
  • C
    6% (2)
  • D
    73% (24)
  • E
    15% (5)

Why each option

The rpm command provides a --changelog option to display the changelog of an installed package when combined with the query flag.

Arpm -Vc postfix

The -V flag verifies installed package files against the RPM database checksums and does not display changelog information.

Brpm -qpil postfix

The -qpil flags query a local package file (-p), listing its info (-i) and file contents (-l), which is used for uninstalled .rpm files and does not show a changelog.

Crpm --changelogpostfix

rpm --changelogpostfix is not valid syntax because --changelog requires a space separator from the package name argument.

Drpm -q --changelog postfixCorrect

The rpm -q flag queries an installed package by name, and --changelog retrieves and displays its changelog entries. This combination correctly targets the installed postfix package and outputs its revision history. Without -q, rpm does not know to look up an installed package by name.

Erpm -qa --changelog postfix

The -qa flag queries all installed packages simultaneously, so postfix is interpreted as a filter or extra argument rather than the target package name, producing incorrect or no output.

Concept tested: rpm query changelog for installed package

Source: https://rpm.org/documentation.html

Topics

#rpm#package management#changelog#RPM queries

Community Discussion

9
Bao N.Bao N.Jun 26, 2026

D is your answer. "rpm -q --changelog postfix" queries the installed package with -q and then dumps the changelog with --changelog, which is exactly what that flag is for. The others fall apart fast: -V is for verification, -qpil is for package file inspection, the --changelog run-together in C is not even valid syntax, and -qa would try to match "postfix" as a changelog search across all packages instead of targeting the installed one directly.

24
Yusuf A.Yusuf A.Jun 26, 2026

D is the right call here. The rpm -q flag is your basic query and --changelog is the option that pulls the package's change history, so rpm -q --changelog postfix does exactly what the question asks. I almost picked E because -qa looks familiar from querying all packages, but -qa means query all installed packages, so that would try to print changelogs for everything on the system, not just postfix. Option B trips people up too since -qpil gives you info and file list but only works against a local .rpm file, not an installed package name.

2
Dervla O.Dervla O.Jun 28, 2026

The -p flag point is worth drilling into because test writers love to swap installed-package syntax with local-file syntax and count on candidates not noticing that distinction under time pressure.

0
Ola B.Ola B.Jun 26, 2026

I almost went with B, but -qpil queries an RPM file, not an installed package changelog.

2
Yusuf A.Yusuf A.Jun 28, 2026

Right, the -p flag is the whole giveaway there, it tells rpm to query the .rpm file directly rather than the installed database, so anything with -p in it is going to be about a package file on disk, not what is already on the system.

0
Dervla O.Dervla O.Jun 26, 2026

The -qa flag queries all installed packages and when you append --changelog postfix at the end you are scoping that output directly to postfix, so E gives you the full changelog for the installed package without any ambiguity about whether the package name is being treated as a file argument versus a query target. I have run this exact syntax in my lab environment and it pulls the postfix changelog cleanly every time, which is why E is the one I am going with on exam day.

0
Thiago A.Thiago A.Jun 29, 2026

Dervla, -qa tells rpm to query every installed package at once, so postfix at the end is not being treated as a name filter, it is a stray argument that rpm ignores or errors on depending on the version. The correct form is rpm -q --changelog postfix, where -q takes the package name directly, which is exactly what D shows.

0
Thiago A.Thiago A.Jun 26, 2026

D is the one. The syntax is rpm -q --changelog postfix, where -q puts rpm into query mode and --changelog pulls the embedded changelog entries from the package metadata. Option A is a verify plus config-file flag, nothing to do with changelogs. Option E trips people up because -qa means query all installed packages, so postfix there becomes an argument that gets ignored or produces unexpected output instead of scoping the query to just that package. Saw this exact question style on my 101 attempt back when I was still mixing up -q flags. I had narrowed it to D and E, and what settled it for me was remembering that -qa is for listing across everything installed, like rpm -qa | grep postfix, not for targeting a single package directly. Once I thought of it that way the answer was obvious. Burned that one into my notes that night.

0
Bao N.Bao N.Jun 28, 2026

The -qa versus -q distinction is the one that kept biting me too, and drilling a few rpm -q variations in a lab until the flags felt automatic is what finally made it stick rather than just reading about it.

0
Full 010-100 Practice