Courseiva

LPIC-1 Linux Installation and Package Management Practice Question

An RPM-based system has a package 'example-1.0' installed, but a newer version 'example-2.0' is available in a repository. Which command will upgrade the package?

⚠ Common exam trap

A common mix-up: candidates confuse 'yum install' (which installs a new package or upgrades if already installed but is not the standard upgrade command) with 'yum update' (the explicit command for upgrading installed packages), or they mistakenly think 'rpm -Uvh' works with repository packages without a local file.

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

✓

yum update example

'yum update example' is the standard command to upgrade a specific package to the latest available version from configured repositories. YUM automatically resolves dependencies and retrieves the newer package from the repository, making it the appropriate tool for upgrading from a repository source.

Answer analysis

Option-by-option breakdown

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

  • ✗

    rpm -Uvh example-2.0.rpm

    Why it's wrong here

    rpm -Uvh example-2.0.rpm upgrades from a local RPM file and cannot fetch example-2.0 from the repository, so it fails unless the file is already downloaded. It is tempting because -U genuinely upgrades an installed package, which is correct when you hold the RPM locally.

  • ✓

    yum update example

    Why this is correct

    yum update example resolves the installed package to the newest available version in enabled repositories, upgrading example-1.0 to example-2.0 while handling dependencies. This satisfies the upgrade constraint, unlike yum install, which would report the package already installed.

  • ✗

    yum check-update example

    Why it's wrong here

    yum check-update example only queries repositories and lists packages with newer versions available; it changes nothing on the system. It is tempting because it confirms that example-2.0 exists in the repository, which is useful for verification, but it never performs the upgrade the scenario requires.

  • ✗

    yum install example

    Why it's wrong here

    yum install example installs the newest available version only when the package is absent; with example-1.0 already present, yum reports it as already installed and performs no upgrade. It is tempting because install resolves dependencies from repositories, which suits fresh installations rather than replacing an existing package.

Visual reference

Client Recursive Resolver Root DNS (13 root servers) TLD DNS (.com, .org, …) Authoritative example.com query IP addr answer

About these practice questions

One of 402 original LPIC-1 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. 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 LPIC-1 practice question is part of Courseiva's free LPI 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 LPIC-1 exam.