I tried to remove PHP from ubuntu:
sudo aptitude purge `dpkg -l | grep php| awk '{print $2}' |tr "\n" " "`
But without results.
when I run php -v in terminal I get PHP 5.3.25-dev
How I can remove ?
Thanks
You did install the PHP5 from the source. PHP 5.3.25 was never part of Ubuntu release.
Hopefully if you did install it into a /usr/local, it could be removed by just going through the files in the /usr/local directories and remove files which seems to be belonging to PHP. If you did install PHP to /usr, then it could be more complicated, and it might require the original source directory where you have compiled the PHP.
If you still have PHP source directory you might want to try doing 'make uninstall' from the source directory, or if that command doesn't work, you could do another 'make install', noting the files which gets installed and removing them manually later.
However this is not really an Ubuntu related question.
It's never a good idea to install software directly from the sources, if you don't know exactly what you are doing.
P.S.: You might want to try the poor man's man "packaging" system - stow - next time to manage installed files in a sane way.
whereis php
php: /usr/local/bin/php /usr/local/lib/php
sudo rm -rf /usr/local/bin/php /usr/local/lib/php
dpkg -l | grep php