From your comments, looks like php
was installed either via source code or with some kind of binary distribution, but not via apt
/dpkg
.
To uninstall it, you should first know how it was installed!
Usually, if via source code, you should find a directory under /usr/src
or /usr/local/src
(or your home
, or...) containing the said source code (maybe /usr/src/php-X.Y.Z
).
Then it (usually!) will be enough to use make uninstall
, but you should check the source code documentation for the proper procedure.
If it was installed via a binary distribution, there might be an uninstall command (try looking in /usr/local/bin
) or you should proceed to manually delete every file/directory.
If you didn't install php
yourself, you should ask who installed it which method was used and acting accordingly.
EDIT as per comments
Looks like you installed it via source code, so to uninstall it you can try
cd php-5.4.15
make uninstall