Courseiva

LPIC-1 Linux Installation and Package Management Practice Question

A Linux administrator is preparing a new Ubuntu 22.04 server and needs to ensure that the package lists are up to date before installing software. Which command should be used to refresh the package index from all configured repositories?

⚠ Common exam trap

Test-takers frequently confuse updating the package index (apt update) with upgrading installed packages (apt upgrade), which are separate operations.

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 synchronizes the local package index with the repositories, ensuring that subsequent install or upgrade commands operate on the latest metadata. It is a prerequisite for installing new software or applying updates. The other commands either perform upgrades based on stale data or are invalid. Refreshing the index is a routine maintenance task on Debian-based systems.

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 install --refresh

    Why it's wrong here

    There is no --refresh option for apt-get install. This command would produce an error. The correct way to refresh the package index is apt update. This option is a fabricated command that does not exist in APT. The administrator should not rely on non-existent options.

  • ✓

    apt update

    Why this is correct

    apt update downloads the latest package metadata from all repositories listed in /etc/apt/sources.list and /etc/apt/sources.list.d/. It refreshes the local cache of available packages and their versions but does not install or upgrade any packages. This is the correct first step before installing software to ensure the system is aware of the newest available versions and dependencies.

  • ✗

    apt upgrade

    Why it's wrong here

    apt upgrade installs the newest versions of all currently installed packages based on the current package index. It does not refresh the package index itself; it relies on metadata already downloaded. Without running apt update first, apt upgrade may not see newer versions. Therefore, this command does not fulfill the requirement of updating the package lists.

  • ✗

    apt dist-upgrade

    Why it's wrong here

    apt dist-upgrade performs a more intelligent upgrade that can install new packages and remove obsolete ones to satisfy dependencies. Like apt upgrade, it uses the existing package index and does not download fresh metadata. It is used for major distribution upgrades, not for refreshing package lists, so it is incorrect for this scenario.

Visual reference

Client Server SYN (seq=100) SYN-ACK (seq=200, ack=101) ACK (ack=201) Connection established — data transfer begins

About these practice questions

This LPIC-1 question is part of Courseiva's 402-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 and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official LPI exam blueprint

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.