Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do i uninstall composer on Mac?

Tags:

composer-php

I have installed Composer with this 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 uninstall it?

like image 967
Mubariz Hajimuradov Avatar asked Sep 04 '16 06:09

Mubariz Hajimuradov


2 Answers

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

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

If you have put composer somewhere else then find it first

1.  which composer

this will return the current path like folder1/folder2/composerand then the same steps:

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

You also may want to delete rest of composer files. Simply go with:

1. cd /
2. cd Users/<hereYourUserName>
3. rm -r .composer 
like image 78
Andrii Bulavkin Avatar answered Sep 30 '22 14:09

Andrii Bulavkin


If you ran composer-setup.php without any additional arguments it should be in a file called composer.phar in the directory where you ran those commands.

Delete that file and you're done.

like image 25
Chris Avatar answered Sep 30 '22 16:09

Chris