Skip to content

Instantly share code, notes, and snippets.

@sirleech
Created February 13, 2012 03:31
Show Gist options
  • Save sirleech/1813307 to your computer and use it in GitHub Desktop.
Save sirleech/1813307 to your computer and use it in GitHub Desktop.
Reinstall Apache2 Ubuntu

To replace configuration files that have been deleted, without purging the package, you can do

sudo apt-get -o DPkg::Options::="--force-confmiss" --reinstall install apache2.2-common

To fully remove the apache2 config files, you should

sudo apt-get purge apache2.2-common

which will then let you reinstall it in the usual way with

sudo apt-get install apache2

Purge is required to remove all the config files - if you delete the config files but only remove the package, then this is remembered & missing config files are not reinstalled by default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment