I have installed PHP 5.4.40 on my Mac OS Mountain Lion, but need >=5.5.9 (for laravel/lumen-framework v5.1.0 installation), so i run installation with package installer,

iMac-Dmitry:Projects dmitry$ curl -s http://php-osx.liip.ch/install.sh | bash -s 5.6

which is finished successful, but i still have: PHP 5.4.40,

iMac-Dmitry:Projects dmitry$ php -v
PHP 5.4.40 (cli) (built: May  3 2015 22:07:42) 
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies

I have no idea how to uninstall old version (i have no installed: yum, apt-get and brew), i don`t remember how i install previous version.

So, please, tell me - how i can uninstall old PHP version from my Mac, without installing additional software (cause it prefer to uninstall it, in the same case as it was installed).

P.S. Maybe it was installed with the same package installer, but how to uninstall PHP with it?

  • The following command should find all the php versions found on your computer- find /usr/bin /usr/local /sw/bin /opt/local/bin $HOME/bin -name 'php*'
    – fd0
    Jul 26, 2015 at 11:33
  • Thanks, found new in /usr/local/php5-5.6.11-20150710-214934/bin/php, with symlink - lrwxr-xr-x 1 root wheel 38 26 июл 13:08 /usr/local/php5 -> /usr/local/php5-5.6.11-20150710-214934 and old at /usr/bin/php Jul 27, 2015 at 20:18

1 Answer 1


Don't uninstall the old php as it is /usr/bin and so supplied by Apple and so might affect the OS and Apple might reinstall it as part od an OS upgrade.

The binary install of php puts php in /usr/local/bin/php

To use it either use the full path or alter your PATH environment variable to have /usr/local/bin before /usr/bin

  • Thanks for advice, it seems that it was installed native, first I even tried to find it at AppStore purchases Jul 27, 2015 at 20:22
  • php won't be through AppStore -what are you asking?
    – mmmmmm
    Jul 28, 2015 at 0:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .