Home > Article > Backend Development > How to delete php on mac
How to delete php on mac: first enter the corresponding PHP directory; then delete php by executing commands such as "sudo rm -rf php-fpm.conf.defaultphp.ini php.ini.default".
Recommended: "PHP Video Tutorial"
Completely uninstall (delete) the php that comes with mac
/private/etc/ sudo rm -rf php-fpm.conf.defaultphp.ini php.ini.default /usr/bin/ sudo rm -rf php php-config phpdoc phpize /usr/include sudo rm -rf php /usr/lib sudo rm -rf php /usr/sbin sudo rm -rf php-fpm /usr/share sudo rm -rf php /usr/share/man/man1 sudo rm -rf php-config.1 php.1 phpize.1 /usr/share/man/man8 sudo rm -rf php-fpm.8
The left is the directory, and the right is the delete command. Only php is deleted, but the php.so and other files referenced by apache are not deleted
ps: It is not recommended to delete the built-in php version. Because some software may Depends on the PHP environment. Although you can self-compile or use brew to install a new version of PHP, it is not recommended for novices. Remember to use TM to back up the system before operation so that you can restore the files after a mistake.
The above is the detailed content of How to delete php on mac. For more information, please follow other related articles on the PHP Chinese website!