Search code examples
macosapachecommand-promptuninstallation

completly uninstall apachectl on macOS


I installed via brew apache2 (brew install apache2), but uninstalled it later (brew uninstall apache2) but now the command apachectl is still left. how do I get rid of it?


Solution

  • Apple delivers an apachectl binary as part of macOS, so I suspect the one you are seeing is that one - and I certainly wouldn't advise you to delete it.

    To check, run this in Terminal:

    type apachectl
    apachectl is /usr/sbin/apachectl
    

    If you get the one in /usr/sbin like I do above, that is the Apple-supplied one. Leave it alone.

    If you get something else, please click edit under your answer and update the question with the new information.