Courseiva
Linux Installation and Package ManagementeasyMultiple ChoiceObjective-mapped

LPIC-1 Linux Installation and Package Management Practice Question

A technician needs to remove a package named 'apache2' along with its configuration files from a Debian system. Which command should be used?

⚠ Common exam trap

A common mix-up: candidates confuse 'apt-get remove' with 'apt-get purge', mistakenly thinking 'remove' also deletes configuration files, or they incorrectly assume 'dpkg -r' performs a purge, when in fact it only removes the package without configuration cleanup.

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 purge apache2

The 'apt-get purge' command removes the specified package along with its configuration files from a Debian system. Unlike 'remove', which leaves configuration files intact, 'purge' deletes both the package binaries and the associated configuration data from /etc and other locations, fulfilling the requirement to remove 'apache2' completely.

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 -r apache2

    Why it's wrong here

    Same as remove, leaves config files.

  • apt-get autoremove apache2

    Why it's wrong here

    autoremove removes orphaned dependencies, not the specified package.

  • apt-get purge apache2

    Why this is correct

    Removes package and config files.

  • apt-get remove apache2

    Why it's wrong here

    Leaves configuration files.

About these practice questions

This LPIC-1 question is part of Courseiva's 527-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 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.