LPIC-1 Linux Installation and Package Management Practice Question
A system administrator needs to remove a package called 'apache2' from a Red Hat Enterprise Linux system while leaving its configuration files intact. Which command accomplishes this?
⚠ Common exam trap
Many exam-takers confuse `yum remove`/`yum erase` (which remove config files by default) with `rpm -e` (which preserves them), or they mistakenly think `rpm -F` is a removal command when it actually performs an upgrade operation.
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
✓
rpm -e apache2
`rpm -e` (erase) removes the package but, by default, leaves configuration files (usually marked as %config in the RPM spec) intact on the filesystem. This behavior is specific to RPM: when erasing a package, RPM renames modified config files with a `.rpmsave` extension rather than deleting them, preserving administrator customizations.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
yum erase apache2
Why it's wrong here
Same as remove, deletes config files.
- ✗
yum remove apache2
Why it's wrong here
Removes config files as well.
- ✓
rpm -e apache2
Why this is correct
Removes package but preserves configuration files.
- ✗
rpm -F apache2
Why it's wrong here
Freshen/upgrade, not removal.
Go deeper
Related to this question
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 →
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.