101-500 practice question 1 of 30

Which of the following commands prints a list of available package updates when using RPM-based package management?

Full set: 246 questions
Answer options
A: dpkg list
B: yum list
C: dpkg check-update
D: yum check-update Correct answer
E: yum list-update
Correct Answer:
D. yum check-update
Explanation

On RPM-based systems like RHEL, CentOS, or Fedora, yum (or its successor dnf) is a high-level package management tool. The command yum check-update queries the configured repositories for newer versions of all currently installed packages. It then prints a list of packages that have an available update, without performing the update itself.

Why Incorrect

A. dpkg list: dpkg is the package manager for Debian-based systems (like Ubuntu), not RPM-based systems.
B. yum list: This command is too general. While yum list updates would work, yum list by itself lists all packages, not just available updates.
C. dpkg check-update: This is an invalid command. dpkg is for Debian-based systems, and it does not have a check-update subcommand.
E. yum list-update: This is not a valid yum command. The correct syntax to list updates is yum list updates or, more directly, yum check-update.

References

Red Hat Enterprise Linux 7 System Administrator's Guide, "Chapter 9. Yum", Section 9.3. "Searching for Packages". The guide states: "To determine which of the installed packages on your system have updates available, type the following: yum check-update".

yum man page (e.g., from CentOS 7): "check-update: This command allows you to determine whether any updates are available for your installed packages. yum returns a list of all package updates from all repositories if any are available."

Scroll to Top