sudo apt-get remove composer
//Uninstall composer
sudo apt-get remove composer
//Uninstall composer and it dependent packages
sudo apt-get autoremove composer
//Purging composer
sudo apt-get purge composer
sudo apt-get autoremove --purge composer
Delete the file composer.phar.
Delete the Cache Folder:
Linux: /home/<user>/.composer
Windows: C:Users<username>AppDataRoamingComposer