I use custom compiled versions of both Apache and PHP and was wondering how to uninstall the default versions that came with my copy of Fedora 13.
The binaries for these are located in /usr/bin
whereas binaries for my compiles are as /usr/local/apache
& /usr/local/php
respectively.
As a webserver with PHP this setup works fine, but when it comes to executing scripts from command line, unless I specify absolute path to the compiled PHP, the one in /usr/bin
takes precedence as it's found first in the path search order.
UPDATE – Uninstall Log
[root@dogmatix ~]# which php
/usr/bin/php
[root@dogmatix ~]# which httpd
/usr/sbin/httpd
[root@dogmatix ~]# yum erase httpd php
Loaded plugins: presto, refresh-packagekit, rhnplugin
This system is not registered with RHN.
RHN support will be disabled.
Setting up Remove Process
Resolving Dependencies
--> Running transaction check
---> Package httpd.i686 0:2.2.15-1.fc13 set to be erased
--> Processing Dependency: httpd-mmn = 20051115 for package: mod_perl-2.0.4-10.fc13.i686
--> Processing Dependency: httpd-mmn = 20051115 for package: mod_python-3.3.1-11.i686
--> Processing Dependency: httpd-mmn = 20051115 for package: 1:mod_ssl-2.2.15-1.fc13.i686
--> Processing Dependency: httpd for package: 1:mod_ssl-2.2.15-1.fc13.i686
--> Processing Dependency: httpd = 2.2.15-1.fc13 for package: 1:mod_ssl-2.2.15-1.fc13.i686
--> Processing Dependency: httpd for package: webalizer-2.21_02-3.i686
--> Processing Dependency: httpd for package: BackupPC-3.1.0-13.fc13.noarch
--> Processing Dependency: httpd >= 2.2.0 for package: gnome-user-share-2.30.0-1.fc13.i686
--> Processing Dependency: httpd = 2.2.15-1.fc13 for package: httpd-manual-2.2.15-1.fc13.noarch
--> Processing Dependency: httpd >= 2.0.40 for package: mod_python-3.3.1-11.i686
--> Processing Dependency: httpd for package: 5:system-config-httpd-1.4.6-1.fc13.noarch
---> Package php.i686 0:5.3.3-1.fc13 set to be erased
--> Running transaction check
---> Package BackupPC.noarch 0:3.1.0-13.fc13 set to be erased
---> Package gnome-user-share.i686 0:2.30.0-1.fc13 set to be erased
---> Package httpd-manual.noarch 0:2.2.15-1.fc13 set to be erased
---> Package mod_perl.i686 0:2.0.4-10.fc13 set to be erased
---> Package mod_python.i686 0:3.3.1-11 set to be erased
---> Package mod_ssl.i686 1:2.2.15-1.fc13 set to be erased
---> Package system-config-httpd.noarch 5:1.4.6-1.fc13 set to be erased
---> Package webalizer.i686 0:2.21_02-3 set to be erased
--> Finished Dependency Resolution
Dependencies Resolved
====================================================================================================================================
Package Arch Version Repository Size
====================================================================================================================================
Removing:
httpd i686 2.2.15-1.fc13 @anaconda-InstallationRepo-201005130056.i386 2.7 M
php i686 5.3.3-1.fc13 @updates 3.3 M
Removing for dependencies:
BackupPC noarch 3.1.0-13.fc13 @anaconda-InstallationRepo-201005130056.i386 2.2 M
gnome-user-share i686 2.30.0-1.fc13 @anaconda-InstallationRepo-201005130056.i386 1.1 M
httpd-manual noarch 2.2.15-1.fc13 @anaconda-InstallationRepo-201005130056.i386 3.5 M
mod_perl i686 2.0.4-10.fc13 @anaconda-InstallationRepo-201005130056.i386 6.0 M
mod_python i686 3.3.1-11 @anaconda-InstallationRepo-201005130056.i386 1.5 M
mod_ssl i686 1:2.2.15-1.fc13 @anaconda-InstallationRepo-201005130056.i386 181 k
system-config-httpd noarch 5:1.4.6-1.fc13 @anaconda-InstallationRepo-201005130056.i386 2.3 M
webalizer i686 2.21_02-3 @anaconda-InstallationRepo-201005130056.i386 329 k
Transaction Summary
====================================================================================================================================
Remove 10 Package(s)
Reinstall 0 Package(s)
Downgrade 0 Package(s)
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Erasing : httpd-manual-2.2.15-1.fc13.noarch 1/10
Erasing : BackupPC-3.1.0-13.fc13.noarch 2/10
Erasing : 5:system-config-httpd-1.4.6-1.fc13.noarch 3/10
Erasing : php-5.3.3-1.fc13.i686 4/10
Erasing : mod_perl-2.0.4-10.fc13.i686 5/10
Erasing : 1:mod_ssl-2.2.15-1.fc13.i686 6/10
Erasing : webalizer-2.21_02-3.i686 7/10
Erasing : mod_python-3.3.1-11.i686 8/10
Erasing : gnome-user-share-2.30.0-1.fc13.i686 9/10
Erasing : httpd-2.2.15-1.fc13.i686 10/10
Removed:
httpd.i686 0:2.2.15-1.fc13 php.i686 0:5.3.3-1.fc13
Dependency Removed:
BackupPC.noarch 0:3.1.0-13.fc13 gnome-user-share.i686 0:2.30.0-1.fc13 httpd-manual.noarch 0:2.2.15-1.fc13
mod_perl.i686 0:2.0.4-10.fc13 mod_python.i686 0:3.3.1-11 mod_ssl.i686 1:2.2.15-1.fc13
system-config-httpd.noarch 5:1.4.6-1.fc13 webalizer.i686 0:2.21_02-3
Complete!
[root@dogmatix ~]# which php
/usr/bin/php
Best Answer
Simply use the package manager (yum) to remove them.
This should get rid of both of them, you might want to check if there's other PHP packages installed though, some might not be removed with the main package.
Update:
You can get a list of all packages ever downloaded (I think) and then filter that for PHP, like:
This would give you a list of all packages containing the word PHP
Now if you're talking about the php binary I think that would be the php-cli package.