Courseiva
Linux Installation and Package ManagementhardMultiple ChoiceObjective-mapped

LPIC-1 Linux Installation and Package Management Practice Question

A system has multiple APT repositories configured. The administrator needs to ensure that for a specific package, the version from a particular repository is always preferred over others, regardless of version number. Which configuration would achieve this?

⚠ Common exam trap

It's easy for candidates to confuse apt-mark hold (which only freezes the installed version) with APT pinning (which controls version selection from repositories), leading them to choose option B instead of the correct pinning configuration.

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

Creating a file in /etc/apt/preferences.d/ with a high Pin-Priority for that package and origin

APT's pinning mechanism, configured via files in /etc/apt/preferences.d/, allows an administrator to assign a high Pin-Priority to a specific package from a particular origin (repository). This ensures that version is always preferred during dependency resolution and upgrades, overriding the default version comparison logic.

Answer analysis

Option-by-option breakdown

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

  • Editing /etc/apt/sources.list and setting the release in sources.list

    Why it's wrong here

    Does not pin a specific package.

  • Using apt-mark hold on the package after installing from desired repository

    Why it's wrong here

    Prevents upgrade but does not preference selection.

  • Creating a file in /etc/apt/preferences.d/ with a high Pin-Priority for that package and origin

    Why this is correct

    APT pinning allows persistent preference.

  • Adding the repository and using apt-get install -t release package

    Why it's wrong here

    Only works for installation, not ongoing preference.

About these practice questions

Courseiva writes every LPIC-1 question from scratch — 527 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or 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.