nerdexam
Linux_Foundation

LFCS · Question #824

When removing a package, which of the following dpkg options will completely remove the files including configuration files?

The correct answer is C. --purge. When removing a Debian package, the --purge option for dpkg ensures that all associated configuration files are also removed, unlike a standard remove operation.

Submitted by minji_kr· Apr 18, 2026Essential Commands

Question

When removing a package, which of the following dpkg options will completely remove the files including configuration files?

Options

  • A--clean
  • B--delete
  • C--purge
  • Dremove

How the community answered

(55 responses)
  • A
    2% (1)
  • B
    2% (1)
  • C
    93% (51)
  • D
    4% (2)

Why each option

When removing a Debian package, the `--purge` option for `dpkg` ensures that all associated configuration files are also removed, unlike a standard `remove` operation.

A--clean

`--clean` is not a standard option for `dpkg` package removal; `apt-get clean` is used to remove retrieved package files from the local repository cache.

B--delete

`--delete` is not a standard `dpkg` option for removal; the standard option for removal is `dpkg -r` or `dpkg --remove`.

C--purgeCorrect

The `dpkg --purge` command removes the specified package and completely deletes its associated configuration files from the system. This provides a clean removal, ensuring no remnants of the package persist.

Dremove

`remove` or `dpkg --remove` removes the package binaries but generally leaves configuration files intact, which is not a complete removal.

Concept tested: dpkg package removal with configuration files

Source: https://manpages.debian.org/dpkg.8

Topics

#dpkg#package management#package removal#configuration files

Community Discussion

No community discussion yet for this question.

Full LFCS Practice