How to Uninstall Composer from PHP Projects

composer-phpuninstallation

I installed composer while trying to install CakePHP, but the installation was not successful and I want to uninstall composer.
I am not finding any way to do this.

For the installation I used the command:

curl -s https://getcomposer.org/installer | php

I am working in Linux.

Best Answer

During the installation you got a message Composer successfully installed to: ... this indicates where Composer was installed. But you might also search for the file composer.phar on your system.

Then simply:

  1. Delete the file composer.phar.
  2. Delete the Cache Folder:
    • Linux: /home/<user>/.composer
    • Windows: C:\Users\<username>\AppData\Roaming\Composer

That's it.