The correct answer is B. yum history undo 46 because it directly reverses the specific transaction identified in the YUM history log. In Red Hat-based Linux distributions, the yum history feature allows administrators to view, manage, and undo past package operations. Each transaction is assigned a unique ID, which can be used to reverse changes accurately.
In this scenario, transaction 46 corresponds to the installation of the httpd package. Using the command yum history undo 46 will attempt to revert that exact transaction by removing the installed package and restoring the system to its previous state before that transaction occurred. This method is precise and preferred in environments where maintaining package consistency is critical.
Option A (yum remove httpd) is incorrect because although it removes the httpd package, it does not specifically reference the transaction history. It may not fully revert all dependencies or changes associated with the original installation transaction.
Option C (yum rollback 46) is incorrect because rollback is not a valid YUM command. The correct functionality is handled through the history undo or history rollback syntax, but rollback requires a different format (typically rolling back to a transaction ID, not specifying a single one in this way).
Option D (yum erase 46) is incorrect because erase expects a package name, not a transaction ID. Using a number like 46 would result in an error.
From a Linux+ system management perspective, understanding yum history commands is essential for package management, auditing, and troubleshooting. It allows administrators to safely reverse changes, ensuring system stability and proper configuration management.
Submit