LPIC-1 Linux Installation and Package Management Practice Question
A sysadmin wants to prevent an APT package from being upgraded automatically but still allow it to be upgraded manually if needed. Which configuration method best achieves this?
⚠ Common exam trap
Many exam-takers confuse `apt-mark hold` with pinning in `/etc/apt/preferences`, assuming a high Pin-Priority (like 1000) prevents upgrades, when in fact it only sets preference order and does not block automatic upgrades.
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
✓
Use 'apt-mark hold <package>'
The `apt-mark hold <package>` command marks a package as held back, preventing it from being automatically upgraded during `apt upgrade` or `apt dist-upgrade`, while still allowing manual upgrades via `apt install <package>` or `apt-mark unhold`. This directly meets the requirement of blocking automatic upgrades but permitting 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.
- ✗
Set the package version to a non-existent version in /etc/apt/preferences
Why it's wrong here
Pointing the pin at a non-existent version makes APT treat the installed version as the only candidate, but it also blocks manual upgrades to any real version, defeating the requirement. It is used to freeze permanently. A Pin-Priority below 1000 with the installed version allows manual override.
- ✓
Use 'apt-mark hold <package>'
Why this is correct
`apt-mark hold` pins the package at its installed version, so `apt upgrade` and `apt-get dist-upgrade` skip it during routine runs. The hold persists until explicitly released, letting the sysadmin run `apt-mark unhold` followed by a manual `apt install` when required — satisfying both the automatic-block and manual-upgrade constraints.
- ✗
Add the package to /etc/apt/preferences with Pin-Priority: 1000
Why it's wrong here
Pin-Priority 1000 forces installation of that version, the opposite of holding it back, and would let APT upgrade the package automatically. Such high pins are used to mandate a specific version. Preventing automatic upgrades requires a priority below 1000, typically 1 or a negative value.
- ✗
Remove the package from sources.list
Why it's wrong here
Removing the package from sources.list prevents APT from finding any candidate version, so manual upgrades also become impossible. It is used to exclude an entire repository. The scenario requires holding only automatic upgrades while manual installation stays possible, which apt-mark hold or a preferences pin achieves.
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.