PHPackages                             dg/composer-cleaner - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. dg/composer-cleaner

ActiveComposer-plugin[Utility &amp; Helpers](/categories/utility)

dg/composer-cleaner
===================

Victor The Cleaner: removes unnecessary files from vendor directory.

v2.2.2(2mo ago)1411.6M↓59%18[7 issues](https://github.com/dg/composer-cleaner/issues)[1 PRs](https://github.com/dg/composer-cleaner/pulls)20BSD-3-ClausePHPPHP &gt;=7.1

Since Jan 5Pushed 2mo ago12 watchersCompare

[ Source](https://github.com/dg/composer-cleaner)[ Packagist](https://packagist.org/packages/dg/composer-cleaner)[ RSS](/packages/dg-composer-cleaner/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (8)Versions (13)Used By (20)

Victor The Cleaner for Composer
===============================

[](#victor-the-cleaner-for-composer)

[![Downloads this Month](https://camo.githubusercontent.com/9a2478267a906e3660220a623d00238be9bd727a14fcd1b78bd24bd98095e949/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f64672f636f6d706f7365722d636c65616e65722e737667)](https://packagist.org/packages/dg/composer-cleaner)[![Tests](https://github.com/dg/composer-cleaner/workflows/Tests/badge.svg?branch=master)](https://github.com/dg/composer-cleaner/actions)

This tool removes unnecessary files and directories from Composer `vendor` directory.

The Cleaner leaves only directories containing the source files needed to use the libraries. These are located according to the [autoload section](https://getcomposer.org/doc/04-schema.md#autoload) of `composer.json` in each installed library. Conversely for example, tests are files that are not needed for use, so they are removed.

Installation
------------

[](#installation)

```
composer require dg/composer-cleaner

```

Then simply run `composer update` or `composer require ...` and the Cleaner automatically removes unnecessary files when new libraries are installed.

Configuration
-------------

[](#configuration)

Some libraries also requires other files/directories, which the the Cleaner judged to be unnecessary. In this case, you can list them (specify paths to be ignored), in the configuration and the tool will keep them. Or you can specify that some libraries should not be cleaned at all.

Simply add a `extra > cleaner-ignore` section to `composer.json` file:

```
{
	"extra": {
		"cleaner-ignore": {
			"slevomat/eet-client": [  // name of package
				"wsdl*"               // list of files or subdirectories, you can use wildcards `*` and `?`
			],

			"mpdf/mpdf": true         // ignores whole package
		}
	}
}
```

Support Project
---------------

[](#support-project)

Do you like Victor The Cleaner? Are you looking forward to the new features?

[![Donate](https://camo.githubusercontent.com/2dd1529e9dabe93bc54843d8f07c6089790b57f1357f23af1c108fb09f3c1de0/68747470733a2f2f66696c65732e6e657474652e6f72672f69636f6e732f646f6e6174696f6e2d312e7376673f)](https://nette.org/make-donation?to=composer-cleaner)

###  Health Score

63

—

FairBetter than 99% of packages

Maintenance85

Actively maintained with recent releases

Popularity56

Moderate usage in the ecosystem

Community34

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 77.6% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~375 days

Recently: every ~785 days

Total

12

Last Release

68d ago

Major Versions

v0.5 → v1.02017-03-21

v1.1 → v2.02017-09-20

PHP version history (2 changes)v0.1PHP &gt;=5.4.0

v2.2PHP &gt;=7.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/17f266513a3ca97500ec3d85d562b9279c7a6346358fe2b8d90390ece717a027?d=identicon)[david@grudl.com](/maintainers/david@grudl.com)

---

Top Contributors

[![dg](https://avatars.githubusercontent.com/u/194960?v=4)](https://github.com/dg "dg (59 commits)")[![JanTvrdik](https://avatars.githubusercontent.com/u/175109?v=4)](https://github.com/JanTvrdik "JanTvrdik (11 commits)")[![Kubo2](https://avatars.githubusercontent.com/u/6882599?v=4)](https://github.com/Kubo2 "Kubo2 (1 commits)")[![matzeeable](https://avatars.githubusercontent.com/u/1008534?v=4)](https://github.com/matzeeable "matzeeable (1 commits)")[![misotolar](https://avatars.githubusercontent.com/u/2345018?v=4)](https://github.com/misotolar "misotolar (1 commits)")[![barchard](https://avatars.githubusercontent.com/u/17622?v=4)](https://github.com/barchard "barchard (1 commits)")[![vrana](https://avatars.githubusercontent.com/u/117453?v=4)](https://github.com/vrana "vrana (1 commits)")[![finwe](https://avatars.githubusercontent.com/u/195675?v=4)](https://github.com/finwe "finwe (1 commits)")

---

Tags

cleanercomposercomposer-pluginphpcomposer

###  Code Quality

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/dg-composer-cleaner/health.svg)

```
[![Health](https://phpackages.com/badges/dg-composer-cleaner/health.svg)](https://phpackages.com/packages/dg-composer-cleaner)
```

###  Alternatives

[symfony/runtime

Enables decoupling PHP applications from global state

74798.8M1.0k](/packages/symfony-runtime)[ergebnis/composer-normalize

Provides a composer plugin for normalizing composer.json.

1.1k41.5M2.8k](/packages/ergebnis-composer-normalize)[automattic/jetpack-autoloader

Creates a custom autoloader for a plugin or theme.

576.1M126](/packages/automattic-jetpack-autoloader)[drupal/core-composer-scaffold

A flexible Composer project scaffold builder.

5344.1M564](/packages/drupal-core-composer-scaffold)[mnsami/composer-custom-directory-installer

A composer plugin, to help install packages of different types in custom paths.

1465.4M62](/packages/mnsami-composer-custom-directory-installer)[drupal/core-project-message

Adds a message after Composer installation.

2124.7M203](/packages/drupal-core-project-message)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
