PHP → Composer remove all global packages

You can find a list of all installed packages by running a command:
composer global info

To remove all global composer packages just:
1. edit COMPOSER_HOME/composer.json file and remove all records from «require» section
2. run composer global update to apply the changes

COMPOSER_HOME by default points to:

  • C:\Users\<user>\AppData\Roaming\Composer on Windows
  • /Users/<user>/.composer on macOS
  • /home/<user>/.composeron other *nix systems