If you ever do:
sudo composer <anything>
Some of your composer's source files ( ~/.composer/) will be written with root, and if you cannot delete or write them again, if you are not using sudoto become root, you have 2 options:
1) Change the user of these files to your own:
sudo chown $USER:$USER -R ~/.composer
Or on mac
sudo chown -R $USER:staff ~/.composer
2) ( ) :
sudo rm -rf ~/.composer/cache
sudo rm -rf ~/.composer