Courseiva

LPIC-1 Linux Installation and Package Management Practice Question

A Linux administrator wants to update the local package index from all configured repositories on an Ubuntu system. Which command accomplishes this?

⚠ Common exam trap

A common mix-up: candidates confuse `apt update` (which updates the package index) with `apt upgrade` (which upgrades installed packages), a common mix-up that leads candidates to choose the upgrade command instead of the index refresh command.

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 update

The `apt update` command (equivalent to `apt-get update`) refreshes the local package index by downloading the latest package lists from all repositories defined in `/etc/apt/sources.list` and `/etc/apt/sources.list.d/`. This is the prerequisite step before any installation or upgrade, ensuring the system knows about the newest available versions and dependencies.

Answer analysis

Option-by-option breakdown

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

  • ✗

    dpkg --configure -a

    Why it's wrong here

    dpkg --configure -a finishes configuring packages left half-installed after an interrupted operation; it reads no repository metadata. It is the right recovery command when apt reports unmet configuration state, but it cannot refresh package indexes from configured sources.

  • ✗

    apt upgrade

    Why it's wrong here

    apt upgrade installs newer versions of already-installed packages; it does not refresh the package index from repositories. It is tempting because both commands touch package state, but upgrade is the right choice when you want to apply available updates rather than synchronise index metadata.

  • ✗

    apt-get install

    Why it's wrong here

    apt-get install installs or upgrades named packages and their dependencies; it never downloads repository index files. It is the correct command when you know which package you need and want it fetched and configured, not when refreshing metadata for all configured repositories.

  • ✓

    apt update

    Why this is correct

    Running apt update refreshes the local package index from every repository listed in sources.list, satisfying the requirement to update metadata without installing anything. The related apt upgrade command installs newer package versions, so it does not meet the stated goal of refreshing the index alone.

About these practice questions

Courseiva writes every LPIC-1 question from scratch — 402 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.