XK0-004 · Question #245
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…
The correct answer is A. apt-get install apache2 B. apt-get --purge remove acache2. Recovering from an incomplete apt package installation requires first purging the broken package and its config files, then performing a clean reinstall.
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
How the community answered
(19 responses)- A89% (17)
- C5% (1)
- D5% (1)
Why each option
Recovering from an incomplete apt package installation requires first purging the broken package and its config files, then performing a clean reinstall.
apt-get install apache2 performs a fresh installation once the broken package state has been cleared by the purge, completing the setup correctly with the now-available disk space.
apt-get --purge remove apache2 removes the incomplete package along with all associated configuration files, fully clearing the broken installation state so that a subsequent clean install can succeed.
apt-get --reinstall install apache2 reinstalls package files over the existing installation but does not purge configuration files or fully resolve broken package state left by the failed original install.
apt-get --reinstall apache2 is invalid syntax because the --reinstall modifier must be combined with the install subcommand, making this command unrecognized by apt-get.
Concept tested: apt-get package purge and reinstallation on Debian/Ubuntu
Source: https://manpages.debian.org/bookworm/apt/apt-get.8.en.html
Topics
Community Discussion
No community discussion yet for this question.