Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

i wanna ask how to remove/uninstall php5 from my RHEL4 i've install it, using

# ./configure
# make
# make install

i've tried

#make uninstall

but there's following error, i've tried it in following Folder when installed it

the error is looking like this :

make : * No Rule to make target 'uninstall'. Stop.

anyone can help me?



share|improve this question
Why do you need to do that? – ghm1014 Dec 17 '11 at 19:12
@ghm1014 i need to uninstall it because in my LINUX GUI it's reads PHP4 by system, but when i'm using 'php -v' in terminal linux it reads i wanna remove PHP5 – why_u Dec 19 '11 at 5:04

2 Answers 2

Removing a package built and installed from source is not an easy task. Usually, these packages come with a make file which enables you to build and install them. If you did not find any option like make uninstall (which is most likely), then you need to remove it manually!

If you still need to remove it, you can follow what the make install command does and run the necessary commands to reverse its changes.

share|improve this answer
if I reverse to change it, it will be remove all the PHP5 packages? – why_u Dec 19 '11 at 5:06

What you could do is use whereis to locate all php related files, and then rm all of them. Unless you kept track of all your configure options (i.e. if you changed the prefix or config file location), then this is one of the only ways I know...

What I would do:

1. Backup your system
2. #whereis php
3. With great care not to delete something that doesn't belong to php, use rm -rf to remove anything the whereis command found.
4. Reload your environment (logout/login)
5. Try to run php, should tell you it's gone
share|improve this answer

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.