Uninstall php/apache packages which were installed from source

15,887

If you still have the original compiled source directory somewhere you may be able to use sudo make uninstall in each directory which (in theory) should remove all of the files installed.

Note I say in theory because it's not guaranteed the Makefile has proper provision for "uninstalling" in this way. Generally the recommendation is to use packages shipped with the distribution unless you're fully aware of what you're doing and have a strategy for handling upgrades & uninstalling applications installed this way.

Share:
15,887

Related videos on Youtube

Rana
Author by

Rana

Software Engineer, Technology Enthusiast, Blogger.

Updated on September 18, 2022

Comments

  • Rana
    Rana over 1 year

    I recently installed php and apache from source distribution on my ubuntu(amazon ec2) instance. Now, I want to remove them. But didn't get a way to do that. Can anyone please help me show should be uninstall them.

    Or If I need to delete files/directories manually, is there any way to find which were installed for a package? Thanks in advance.

    • ionFish
      ionFish over 11 years
      dpkg -r apache2 or dpkg -r php5 (You will need to adjust according to your version)
  • Rana
    Rana over 11 years
    that is the command to remove binary distribution, not source distribution. I need a solution for package installed from source code with 'make' command.
  • Rana
    Rana over 11 years
    Hi, Thanks. I searched and found such tips to use 'make uninstall', but seems like its not available on either of the source distributions. Is there any alternative commands as well?
  • dortegaoh
    dortegaoh over 7 years
    yum will not work on ubuntu and this will not remove software installed from source.
  • BenS.
    BenS. over 7 years
    It's working but on Amazon Linux Ubuntu 14.04! Or?
  • BenS.
    BenS. over 7 years
  • BenS.
    BenS. over 7 years
    @GeraldSchneider
  • dortegaoh
    dortegaoh over 7 years
    Quote from your link: If you are trying to set up a LAMP web server on an Ubuntu instance, this tutorial will not work for you. These procedures are intended for use with Amazon Linux