Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Recently, I decided to set up a local development environment for my work projects. I'm a PHP developer, with just enough knowledge of Linux and Apache to break things mightily.

To get the local environment looking like my work environment, I had to upgrade PHP. When I did, Apache wouldn't restart. I decided I wanted to start fresh (this is where things went wrong) and that I'd reinstall Apache and PHP using MacPorts.

So, I went through and tried to delete all the Apache files. Yup.

I ran locate apache2 and deleted any folders that looked important. (I know, I know)

Then I did a /usr/libexec/locate.updatedb to make sure everything was up to date.

I even restarted my machine, just to make sure.

The issue is, http://localhost still works. As does an alias I set up, http://butler.

Shouldn't they not work? Now that I'm this far in, are there any tips for how to completely remove Apache so I can start over?

Worst case, I have a timemachine backup, so I can always just restore that... Thanks in advance.

Update: It officially isn't working anymore. I'm afraid I might have some files still lingering, but for the meantime, it seems that Apache is gone. Now to reinstall. Thanks for the help!

share|improve this question
if you run ps waux | grep httpd do you see anything? – gravyface Apr 28 '10 at 19:30
myname 1332 0.0 0.0 599824 500 s000 R+ 1:36PM 0:00.00 grep httpd – PJ. Apr 28 '10 at 19:37
kill -9 1332 will stop it for you then. – Lee B Apr 28 '10 at 20:13
@Lee B, why would he want to kill 1332, which is the grep conmmand he just ran and will be terminated before he could even type in the kill command? – John Gardeniers Apr 28 '10 at 22:03
@John: ah, missed the grep part. I guess I'm not so aware of checking for that these days, as I use pgrep which doesn't list itself in results. Thanks for catching that :) – Lee B Apr 29 '10 at 18:33
up vote 2 down vote accepted

You say "(I know, I know)", but behave as if you don't know, so I'll explain :)

Just randomly deleting folders called apache2 is not likely to be effective. For one thing, apache isn't actually called apache; it's proper name is "httpd", by the Apache Foundation, so the most important files are probably called httpd on your system.

But the lesson to learn here is NOT that you deleted the wrong filenames. It's that you tried to delete things manually when operating systems provide uninstallers (or better, package management tools) for this sort of thing.

You also seem to be unaware of apachectl, which will help you stop the apache processes from a command line, and the system preferences, which let you do it from a GUI.

You might find this useful, for cleaning up:

share|improve this answer
Thanks Lee. I actually also deleted the apachectl. Gotta give you guys a challenge, right! So, now that the installers, packages, management tools, etc., are all probably destroyed... – PJ. Apr 28 '10 at 19:38

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.