Courseiva

LPIC-1 Linux Installation and Package Management Practice Question

A Yellowdog Updater Modified (YUM) transaction that included several package installations and upgrades completed successfully, but a recent change caused a service to break. The administrator wants to revert the entire transaction using its transaction ID. Which command should be used?

⚠ Common exam trap

Many exam-takers confuse `undo` (revert a single transaction) with `rollback` (revert all transactions after a given point), leading candidates to choose option C when they only want to reverse one transaction.

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 history undo 123

`yum history undo 123` reverts the specific transaction identified by ID 123, reversing all changes (installs, upgrades, removals) made in that transaction while preserving the current state of other packages. This is the intended command for rolling back a single transaction without affecting subsequent transactions.

Answer analysis

Option-by-option breakdown

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

  • ✗

    yum history redo 123

    Why it's wrong here

    Redo reapplies the transaction's package changes, so the broken service stays broken instead of reverting. It tempts because the name suggests undoing history, but redo repeats a transaction, and would be correct if you wanted to re-run a previously undone transaction.

  • ✗

    yum remove <packages>

    Why it's wrong here

    Removing the named packages deletes them outright and leaves their dependencies and configuration behind, so the earlier transaction is not reverted. It tempts because removal undoes an installation, and would be correct if you simply wanted specific packages gone rather than reversing a whole transaction.

  • ✗

    yum history rollback 123

    Why it's wrong here

    Rollback reverses the transaction and every later transaction, discarding subsequent changes; undo reverts only the specified transaction while preserving everything after it. It is tempting because both take a transaction ID, but the scenario needs only the broken transaction reversed, so undo is the precise command.

  • ✓

    yum history undo 123

    Why this is correct

    `yum history undo 123` reverses every package installation, upgrade and downgrade recorded under transaction ID 123, restoring the exact prior versions in one operation. This directly satisfies the stem's requirement to revert the entire transaction by its ID, rather than selectively removing individual packages.

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.