A Composer plugin that removes unused files like tests and documentation from vendor packages to reduce deployment size.
Composer Cleanup Plugin is a PHP Composer plugin that automatically removes unused files—such as tests, documentation, and build configurations—from packages in the vendor directory. It solves the problem of bloated vendor folders, reducing disk space usage and improving deployment speeds, especially for FTP-based or storage-limited environments.
PHP developers and teams deploying applications via FTP or with constrained disk space, who need to optimize their Composer vendor directory for production.
Developers choose this plugin because it automates the cleanup process, integrates seamlessly with Composer workflows, and provides a rule-based system to safely remove only non-essential files without breaking dependencies.
Composer plugin for cleaning up unused files from packages.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Seamlessly hooks into Composer install/update processes, removing files like tests and docs without manual intervention during builds.
Targets non-essential files such as READMEs, PHPUnit configs, and documentation, which can significantly cut vendor directory size for FTP deployments.
Uses curated rules for specific packages to avoid deleting essential files, reducing the risk of breaking dependencies compared to blanket deletions.
The README states it's no longer maintained, meaning no bug fixes, security updates, or guarantee of compatibility with newer Composer or PHP versions.
Only cleans packages with predefined rules in CleanupRules.php; many dependencies are ignored, making it less effective for diverse projects.
Requires packages to be installed via --prefer-dist, so it won't work with source installations or environments where development files are needed.