LPIC-1 Linux Installation and Package Management Practice Question
A Debian system has some partially installed packages due to a failed installation. Which TWO commands can help resolve the broken dependencies? (Choose exactly two.)
⚠ Common exam trap
Many candidates confuse `apt-get upgrade` or `dist-upgrade` with dependency repair, but only `-f install` and `dpkg --configure -a` are the correct tools for fixing broken dependencies from a failed installation.
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 -f install
The `apt-get -f install` command (option A) is specifically designed to fix broken dependencies by attempting to correct a system with unsatisfied dependencies, often by installing missing packages or removing partially installed ones. The `dpkg --configure -a` command (option D) reconfigures any unpacked but not yet configured packages, which is a common state after a failed installation, and can resolve dependency issues by completing the configuration of partially installed packages.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
apt-get -f install
Why this is correct
`apt-get -f install` triggers APT's dependency repair routine, scanning the dpkg database for packages left in a half-configured or unpacked state and attempting to fix broken dependencies by installing missing prerequisites or removing offending packages. This directly satisfies the stem's constraint: a Debian system with partially installed packages after a failed installation.
- ✗
apt-get dist-upgrade
Why it's wrong here
Dist-upgrade performs a full system upgrade, intelligently handling changing dependencies, but it does not specifically repair or configure partially installed packages. It is tempting because it resolves dependency conflicts during upgrades, making it the right choice when moving a Debian system to a new release.
- ✗
apt-get upgrade
Why it's wrong here
Upgrade only installs newer versions of already-installed packages; it will not fetch missing dependencies or configure half-installed ones, so the broken state persists. It is tempting because upgrade is the routine maintenance command, and it is correct when the goal is simply applying available package updates.
- ✓
dpkg --configure -a
Why this is correct
`dpkg --configure -a` re-runs configuration for every unpacked-but-unconfigured package, directly clearing the partially installed state left by the failed installation. It satisfies the stem's broken-dependency constraint by completing pending configuration steps, letting APT's dependency graph settle before any further installs.
- ✗
apt-get remove --purge
Why it's wrong here
Purging removes packages and their configuration files but does not repair the dependency graph; it can leave dependants broken or unconfigured. It is tempting because purge is the standard remedy for clearing a single unwanted package completely, which is the right task when removing software rather than fixing partial installs.
Visual reference
Go deeper
Related to this question
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 →
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.