XK0-004 · 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 ins
The correct answer is A. rpm -e network-tools. Removing an incorrectly installed RPM package requires the rpm -e (erase) option followed by the package name, not the filename.
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
(28 responses)- A93% (26)
- C4% (1)
- D4% (1)
Why each option
Removing an incorrectly installed RPM package requires the rpm -e (erase) option followed by the package name, not the filename.
rpm -e network-tools uses the erase flag to remove the installed package by querying the RPM database using the package name alone, without version or architecture suffixes. This is the correct and complete syntax for uninstalling an RPM package, as rpm resolves the installed instance from its internal database. After removal, the administrator can install the correct architecture version cleanly.
rpm -U network-tools-12.1-17.i386.rpm invokes the upgrade operation, which would attempt to replace the package with the same incorrect i386 file rather than removing it.
rpm -ivh network-tools-12.1-17.i686.rpm attempts to install the correct architecture package without first removing the conflicting i386 version already on the system.
rpm -r is not a valid rpm flag; the correct option to remove/erase a package is -e, and -r does not exist in rpm's option set.
Concept tested: Removing an installed RPM package using rpm -e
Source: https://man7.org/linux/man-pages/man8/rpm.8.html
Topics
Community Discussion
No community discussion yet for this question.