nerdexam
CompTIACompTIA

XK0-005 · Question #245

XK0-005 Question #245: Real Exam Question with Answer & Explanation

The correct answer is A: apt-get install apache2. To properly reinstall a package after a failed installation due to disk space, the existing partial installation should first be completely removed, and then the package reinstalled.

System Management

Question

The Apache web server was recently installed on a Debian/Ubuntu server. The web server fails and a review of log messages on another partition reveals the installation was not completed properly due to lack of disk space. After clearing the files, the systems administrator has requested the installation to be performed again. Which of the following command lines will perform this task? (Choose two.)

Options

  • Aapt-get install apache2
  • Bapt-get --purge remove acache2
  • Capt-get --reinstall install apache2
  • Dapt-get --reinstall apache2

Explanation

To properly reinstall a package after a failed installation due to disk space, the existing partial installation should first be completely removed, and then the package reinstalled.

Common mistakes.

  • C. apt-get --reinstall install apache2 is not a valid command; the --reinstall option is used with install but without the duplicate subcommand, and it primarily works for already installed packages.
  • D. apt-get --reinstall apache2 attempts to reinstall an already installed package but does not guarantee the removal of all configuration files and might not fully clean up a broken installation state like purge remove does.

Concept tested. APT package management - purge and install

Reference. https://manpages.debian.org/testing/apt/apt-get.8.en.html

Topics

#Package Management#Debian/Ubuntu#Web Server Installation#Troubleshooting

Community Discussion

No community discussion yet for this question.

Full XK0-005 PracticeBrowse All XK0-005 Questions