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.
Question
Options
- A--clean
- B--delete
- C--purge
- Dremove
How the community answered
(55 responses)- A2% (1)
- B2% (1)
- C93% (51)
- D4% (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.
`--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.
`--delete` is not a standard `dpkg` option for removal; the standard option for removal is `dpkg -r` or `dpkg --remove`.
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.
`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
Community Discussion
No community discussion yet for this question.