How do i uninstall php on linux box?

I’m such a *nix newbie and sure the question is lame indeed :frowning: However i googled it down and found very obscure results.

Well i compiled php from tar on my linux box successfully, everything worked fine.

Now i need to uninstall it(don’t ask me :))…i know where php binaries are in file system and i can do it manually…but is there a more elegant way?

make deinstall, make uninstall didn’t work…

Probably i need to re-run ./configure with some special parameter so it would create Makefile with deinstall, uninstall targets (am i mixing the terms?)???
(Seems to be actually not a php question rather *nix program maintenance one?)

Well it really depends… What Linux distribution are you on?


I installed php from source and was able to uninstall it with the rpm command. Try doing this at the linux command line:

rpm -q php

See if it comes up. If so then uninstall it. It might give an error stating it has deps. I usually do -nodeps when I do the uninstall for php.


[mike@mike_linux mike]$ rpm -q php
package php is not installed

Doesn’t make install create some log file containing what it actually installed?

This site will hopefully point you in the right direction:

I uninstalled php the ‘dirty’ way once with a rm -rf command on the php directory, you have to be very sure when doing this though, as you could potentially destroy your whole system!

Thanks! There’s much general info, very nice indeed!