nerdexam
CompTIA

XK0-005 · Question #299

A Linux administrator has downloaded the network-tools-12.1-17.i386.rpm package for installation to a local system. The administrator issues the rpm -ivh nerwork-cools-12.1- 17.i386.rpm command to…

The correct answer is A. rpm -e network-tools. To remove an RPM package, the rpm -e command is used, specifying the package name rather than the full file name.

System Management

Question

A Linux administrator has downloaded the network-tools-12.1-17.i386.rpm package for installation to a local system. The administrator issues the rpm -ivh nerwork-cools-12.1- 17.i386.rpm command to install the package. After attempting to use the newly installed package, the administrator realizes the package for the system’s architecture was not installed correctly. Which of the following commands should the administrator use to remove the package from the system?

Options

  • Arpm -e network-tools
  • Brpm -U network-tools-12.1-17.i386.rpm
  • Crpm -ivh network-tools-12.1-17.i686.rpm
  • Drpm -r network-tools

How the community answered

(13 responses)
  • A
    85% (11)
  • C
    8% (1)
  • D
    8% (1)

Why each option

To remove an RPM package, the `rpm -e` command is used, specifying the package name rather than the full file name.

Arpm -e network-toolsCorrect

The `rpm -e` (or `--erase`) command is used to uninstall a package from the system. When erasing, you specify the package name (`network-tools`), not the full RPM file name or version, as the system identifies installed packages by their registered names.

Brpm -U network-tools-12.1-17.i386.rpm

The `rpm -U` (or `--upgrade`) command is used to upgrade or install a package, not remove it.

Crpm -ivh network-tools-12.1-17.i686.rpm

The `rpm -ivh` command is used to install a package (`-i`), show verbose output (`-v`), and display a hash mark progress bar (`-h`), not to remove it; furthermore, `i686` is another architecture, not a removal command.

Drpm -r network-tools

The `-r` option is not a standard or documented option for `rpm` to remove a package; `-e` is the correct option for erasing.

Concept tested: RPM package uninstallation

Source: https://man7.org/linux/man-pages/man8/rpm.8.html

Topics

#RPM package management#Package removal#Linux commands#System administration

Community Discussion

No community discussion yet for this question.

Full XK0-005 Practice