What is the difference between the --remove and the --purge action with the dpkg command?
A.
--remove removes the program, --purge also removes the config files
B.
--remove only removes the program, --purge only removes the config files
C.
--remove removes a package, --purge also removes all packages dependent on it
D.
--remove removes only the package file itself, --purge removes all files related to the package
The Answer Is:
A
This question includes an explanation.
Explanation:
The dpkg command is a tool to install, build, remove and manage Debian packages. The option --remove is used to remove an installed package, but it does not remove the configuration files that may have been modified by the user. The option --purge is used to remove an installed package and also delete its configuration files. This can be useful if the user wants to completely uninstall a package and start from scratch if it is reinstalled later. The syntax is: dpkg --remove package or dpkg --purge package. For example, dpkg --remove nginx will remove the nginx web server package, but it will leave the configuration files in /etc/nginxdpkg --purge nginx will remove the nginx package and also delete the configuration files in /etc/nginx1. The other options are not correct because:
–remove only removes the program, --purge only removes the config files: This is false, because --purge also removes the program, not just the config files.
–remove removes a package, --purge also removes all packages dependent on it: This is false, because --purge does not remove any other packages, only the specified one. To remove a package and its dependencies, the apt-get command can be used with the option --auto-remove2.
–remove removes only the package file itself, --purge removes all files related to the package: This is false, because --remove also removes the files that are installed by the package, not just the package file itself. --purge only removes the configuration files that are not removed by --remove. References:
dpkg(1) — dpkg — Debian buster — Debian Manpages
How to remove a package and its dependencies with dpkg? - Ask Ubuntu
101-500 PDF/Engine
Printable Format
Value of Money
100% Pass Assurance
Verified Answers
Researched by Industry Experts
Based on Real Exams Scenarios
100% Real Questions
Get 60% Discount on All Products,
Use Coupon: "8w52ceb345"