Ask Your Question

Uninstalling PHP leaves files in /usr/bin/

asked 2012-10-09 21:49:58 -0500

beardedlinuxgeek gravatar image

I had PHP installed and I uninstalled it using "sudo yum remove php" because I wanted to build from source. In /usr/bin/ I still have the files:

pear peardev pecl phar phar.phar php php-cgi php-config phpize

I also have the binaries which I built from source in /opt/php5/bin/ so I appended them to my PATH by adding PATH=/opt/php5/bin/:$PATH to my .bash_profile and I could just rm the binaries from my /usr/bin but the whole thing just seems dirty.

What's the official protocol for handling this and why were those binaries left behind after I removed the packages?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2012-10-11 10:06:21 -0500

skvidal gravatar image

If you installed using:

yum install php

It will pull in a lot of dependencies. Your best bet to remove all of what it installed is this:

yum history list

find the transaction id (first column) where you install php. then run:

yum history undo thattransactionid

That should remove all the packages that came in during that transaction.

edit flag offensive delete link more

answered 2012-10-11 00:00:35 -0500

Remi gravatar image

"yum remove php" only remove the mod_php provided byt this package.

"yum remove php-common" will remove all the php stuff

Why do you think you need to build from sources ?

edit flag offensive delete link more

Question Tools


Asked: 2012-10-09 21:49:58 -0500

Seen: 1,572 times

Last updated: Oct 11 '12