martinshaw/decomposer

List Composer 'vendor' directories on your system, how heavy they are, then you can select which ones you want to delete to free up space (NPM's npkill but for PHP Composer)

1.1.7 2024-03-09 19:50 UTC

This package is auto-updated.

Last update: 2024-04-10 08:55:35 UTC


README

List Composer 'vendor' directories on your system, how heavy they are, then you can select which ones you want to delete to free up space (NPM's npkill but for PHP Composer)

Screenshot

Screenshot

Usage

decomposer # Opens the interactive UI
decomposer --all # Deletes all vendor directories without interaction

Installation

composer global require martinshaw/decomposer

This will install the decomposer command in your global composer bin directory, which is usually ~/.composer/vendor/bin or ~/.config/composer/vendor/bin on Unix systems and %APPDATA%\Composer\vendor\bin on Windows.

To access the decomposer command from anywhere, you need to add the global composer bin directory to your system's PATH environment variable.

On Windows

  1. Open the Control Panel.
  2. Click on System and Security.
  3. Click on System.
  4. Click on Advanced system settings.
  5. Click on Environment Variables.
  6. Under System variables, find and select the Path variable, then click on Edit.
  7. Click on New and add the path to your global composer bin directory.
  8. Click on OK on all windows to apply the changes.

On Linux and macOS

Depending on if your global composer bin directory is ~/.composer/vendor/bin or ~/.config/composer/vendor/bin, you need to add the following line to your ~/.bashrc, ~/.zshrc, or ~/.profile file:

export PATH="$PATH:$HOME/.composer/vendor/bin"

or

export PATH="$PATH:$HOME/.config/composer/vendor/bin"

Then, run the following command to apply the changes:

source ~/.bashrc

or source ~/.zshrc or source ~/.profile depending on which file you added the line to.