On Red Hat Linux, to remove an Apache version installed with the RPM tool, use:
# rpm -ev apache
Other packaging systems may provide some similar mechanism. If they don’t, however, chances are that cleaning out all the files will require a lot of manual work.
On Windows, Apache can typically be removed like any other MSI-installed software (see Figure 1-14).
Unfortunately, there is no generic works-for-all removal method for Apache installations on Unixish systems. Some packages, such as Red Hat’s RPM, do remember what they installed so they can remove all the pieces, as shown in the solution. However, if the software was installed by building from the sources (see Recipe 1.4), the burden of knowing where files were put rests with the person who did the build and install. The same applies if the software was installed from source on a Windows system; it’s only the MSI or InstallShield packages that make the appropriate connections to allow the use of the Add/Remove Software control panel.
For a Unixish system, if you have access to the directory in
which the server was built, look for the --prefix
option in the config.nice file.
That will give you a starting point, at least. Here is a list of the
directories an Apache 2.0 installation usually puts somewhere on your disks:
bin |
build |
cgi-bin |
conf |
error |
htdocs |
icons |
include |
lib |
logs |
man |
manual |
modules |
Get Apache Cookbook, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.