Linux – remove apache tar binary package in centos

apache-2.2centoslinux

I need help in removing binary package that had been installed in my linux machine.
The scenario that I am having are such as like this:

I've already install latest apache that I get from its website(httpd.apache.org) through Unix binary package(tar.gz)

After successfully install program,the apache server web perfectly without any issues.

But then I having a thought,if there are another latest release version of apache in the future,then I need to make sure that i can upgrading current apache or reinstalling the new version apache.

So my question is, how do I ensure that I have remove the old apache and all its dependencies so that it will not having conflict(probably) when installing the new apache.

Right now the only thing that i can think of is to remove all the apache folder manually :

rm -rf /apache2

Hope someone can shed some light about this.Thanks.

Best Answer

Usually you just delete the folder, populate a new one and it should work, if all the files are there (don't forget to make a backup of the configs).

If you just want it to work, there's no need for deleting at all. The new binaries will overwrite the old. You only have to be careful about configs (not overwriting old=good=configured ones with default="empty". There might be some leftover files, but except for a couple of megs of extra used space, there's nothing to worry about.

The proper way to manage all that, is to create a package compatible with your package manager, and let it worry about un/installs. If you have a .deb/.rpm style distribution, check out checkinstall.