How to remove composer on Mac?

I installed Composer with these commands:

php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('SHA384', 'composer-setup.php') === 'e115a8dc7871f15d853148a7fbac7da27d6c0030b848d9b3dc09e2a0388afed865e6a3d6b3c0fad45c48e2b5fc1196ae') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php
php -r "unlink('composer-setup.php');"

How can I remove it?

+5
source share
2 answers

If you started composer-setup.phpwithout any additional arguments, it should be in a file with a name composer.pharin the directory in which you ran these commands.

Delete this file and you're done.

+5
source

You followed the instructions on the composer's website and probably installed the composer globally, if so, just use:

1.  cd usr/local/bin
2.  rm -r composer

If you placed the composer in another place, find him first

1.  which composer

this will return the current path as folder1/folder2/composerthen the same steps:

1.  cd folder1/folder2
2.  rm -r composer

. :

1. cd /
2. cd Users/<hereYourUserName>
3. rm -r .composer 
0

Source: https://habr.com/ru/post/1653563/


All Articles