LPIC-1 Exam 101 v5 (Linux Administrator) — Question 97
Which command uninstalls a package but keeps its configuration files in case the package is re-installed?
Answer options
- A. dpkg -s pkgname
- B. dpkg -L pkgname
- C. dpkg -P pkgname
- D. dpkg -v pkgname
- E. dpkg -r pkgname
Correct answer: E
Explanation
The correct command to remove a package while keeping its configuration files is 'dpkg -r pkgname'. This allows for easy reinstallation without losing settings. The other options either check the status, list files, or remove everything including configuration files.