Courseiva
Linux Installation and Package ManagementhardMultiple ChoiceObjective-mapped

LPIC-1 Linux Installation and Package Management Practice Question

After a failed package upgrade, a Debian system shows 'unmet dependencies' when trying to install any new software. What is the most appropriate command to fix this condition?

⚠ Common exam trap

Many candidates think manually editing the dpkg database (option A) is a quick fix, but LPIC-1 tests the understanding that APT's built-in repair mechanism is the correct and safe approach, not low-level manual manipulation.

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

apt-get install -f

The 'apt-get install -f' command (option B) is the correct fix because it invokes the '--fix-broken' option, which automatically resolves unmet dependencies by either installing missing packages or removing partially installed ones. This is the standard Debian/APT tool for repairing a broken package state after a failed upgrade, as it reads the dpkg database and corrects inconsistencies without manual intervention.

Answer analysis

Option-by-option breakdown

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

  • Edit /var/lib/dpkg/status manually

    Why it's wrong here

    Manual edits are risky and should be a last resort; apt-get install -f is safer.

  • apt-get install -f

    Why this is correct

    The -f flag fixes broken dependencies.

  • dpkg --purge $(dpkg -l | grep ^iU | awk '{print $2}')

    Why it's wrong here

    Removing all partially installed packages is not a standard fix and may remove needed software.

  • dpkg --force-depends -i *.deb

    Why it's wrong here

    Force-installing ignores dependencies and may worsen the situation.

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

This LPIC-1 question is part of Courseiva's 527-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. 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.