2

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 !

2 Answers2

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).

janneb
  • 3,841
  • 19
  • 22
  • I tried `rpm -qa|grep php`,but there's nothing. –  May 05 '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 05 '10 at 11:27
2

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.

Matt Simmons
  • 20,396
  • 10
  • 68
  • 116