Ask Your Question

Uninstalling PHP leaves files in /usr/bin/

asked 2012-10-10 02:49:58 +0000

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 15:06:21 +0000

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 05:00:35 +0000

"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

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Use your votes!

  • Use the 30 daily voting points that you get!
  • Up-vote well framed questions that provide enough information to enable people provide answers.
  • Thank your helpers by up-voting their comments and answers. If a question you asked has been answered, accept the best answer by clicking on the checkbox on the left side of the answer.
  • Down-voting might cost you karma, but you should consider doing so for incorrect or clearly detrimental questions and answers.


Asked: 2012-10-10 02:49:58 +0000

Seen: 1,286 times

Last updated: Oct 11 '12