nerdexam
CompTIA

LX0-103 · Question #11

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

The correct answer is C. --purge. The dpkg --purge option completely removes a package including its configuration files, whereas a standard removal leaves config files behind.

Linux Installation and Package Management

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

(33 responses)
  • A
    3% (1)
  • C
    94% (31)
  • D
    3% (1)

Why each option

The dpkg --purge option completely removes a package including its configuration files, whereas a standard removal leaves config files behind.

A--clean

--clean is not a valid dpkg removal option; it is used in apt contexts to clear the package cache, not to remove packages.

B--delete

--delete is not a recognized dpkg option for package removal.

C--purgeCorrect

The --purge option instructs dpkg to remove all files associated with a package, including configuration files that would normally be retained by a standard removal. This brings the package to a 'not-installed, no-config' state, which is useful when a clean reinstall or full decommission is required.

Dremove

The 'remove' option (or -r) removes the package binaries but intentionally preserves configuration files in case the user reinstalls the package later.

Concept tested: dpkg complete package removal including config files

Source: https://man7.org/linux/man-pages/man1/dpkg.1.html

Topics

#dpkg#package removal#purge#configuration files

Community Discussion

No community discussion yet for this question.

Full LX0-103 Practice