Which flag must be used with dpkg to remove a package?

Disable ads (and more) with a premium pass for a one time $4.99 payment

Boost your Linux skills with the CompTIA Linux+ Certification Exam simulator. Engage with multiple choice questions and detailed feedback. Master Linux concepts and prepare for your exam with confidence!

To remove a package using the dpkg command, the appropriate flag to use is -r. This short format flag is a commonly used option in many Linux commands for indicating the removal of an item, making it a familiar choice for users comfortable with command-line utilities.

When you execute dpkg -r package_name, it triggers the removal process of the specified package while keeping configuration files intact. This is particularly useful for maintaining settings in case you reinstall the package later.

The use of -r aligns with standard Linux conventions for command flags, which usually streamline user interaction by providing shorter alternatives to more descriptive options. In this case, specifying -r is sufficient and widely recognized across different versions of the dpkg command.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy