Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Now it's installed wrongly,

I need to uninstall and reinstall them.

They're installed from source.

How can I efficiently uninstall them first?

I tried make uninstall in php_source_dir,but only got:

make: *** No rule to make target `uninstall'.  Stop.

Thanks !

share|improve this question

2 Answers 2

Well, one of the great advantages of using rpm/deb/whatever packages, is that the package system keeps track of them and they can thus be cleanly removed/upgraded/etc.

If the configuration system has no "uninstall" target or somesuch, you're basically hosed and have to remove it manually. For example, rerun "make install", see which files it copies where and then manually delete those files (or create a script that parses the output of "make install", but for a single case it's probably not worth the trouble).

share|improve this answer
    
I tried rpm -qa|grep php,but there's nothing. –  ngache May 5 '10 at 11:19
    
@ngache - no, unless you installed the RPM version (i.e. not from source) the rpm command will be no use. You are going to have to manually remove the files. Perhaps the question should be "how do I fix problem X with my PHP", rather than how do I remove it? –  Coops May 5 '10 at 11:27

I completely agree with janneb. This is exactly why package management is so popular.

Anyway, enough berating you.

I'm assuming that you ran configure. Did you modify the installation target with --prefix ?

Maybe the most bulletproof way would be to read the Makefile under the install: section and figure out what it copied and where.

How recently did you install them? You could run a "find" command to find all of the files that have been created in that time span, if it hasn't been long.

share|improve this answer
1  
I thought that's why VM's were popular? Rollback snapshot... :-) –  Bart Silverstrim May 5 '10 at 12:09
    
Barn door, Bart... –  David Mackintosh May 5 '10 at 14:46

Your Answer

 
discard

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