PHPackages                             barryvdh/laravel-vendor-cleanup - 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. barryvdh/laravel-vendor-cleanup

AbandonedLibrary[Utility &amp; Helpers](/categories/utility)

barryvdh/laravel-vendor-cleanup
===============================

A vendor cleanup package, to remove tests and documentation to save space

v1.2.4(11y ago)16752.7k↓62.5%171MITPHPPHP &gt;=5.3.0

Since May 29Pushed 8y ago11 watchersCompare

[ Source](https://github.com/barryvdh/laravel-vendor-cleanup)[ Packagist](https://packagist.org/packages/barryvdh/laravel-vendor-cleanup)[ RSS](/packages/barryvdh-laravel-vendor-cleanup/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (4)Versions (11)Used By (1)

Laravel Vendor Cleanup Command
------------------------------

[](#laravel-vendor-cleanup-command)

### Remove tests &amp; documentation from the vendor dir

[](#remove-tests--documentation-from-the-vendor-dir)

### Stand-alone Composer plugin:

[](#stand-alone-composer-plugin-httpsgithubcombarryvdhcomposer-cleanup-plugin)

#### Don't use this when you hava ssh access, just use composer and don't worry about size!

[](#dont-use-this-when-you-hava-ssh-access-just-use-composer-and-dont-worry-about-size)

#### If possible at all, just create a distribution script or use git to deploy!

[](#if-possible-at-all-just-create-a-distribution-script-or-use-git-to-deploy)

Require this package in your composer.json:

```
"barryvdh/laravel-vendor-cleanup": "1.*"

```

And add the ServiceProvider to the providers array in app/config/app.php

```
'Barryvdh\VendorCleanup\VendorCleanupServiceProvider',

```

You can now remove all the docs/tests/examples/build scripts throught artisan

```
php artisan vendor-cleanup

```

You should change your composer file to use the `dist` version, without the .git history. You can configure your composer.json to do this, and cleanup after updating:

```
"scripts":{
    "post-install-cmd": [
        "php artisan vendor-cleanup",
        "php artisan optimize"
    ],
    "post-update-cmd":[
        "php artisan vendor-cleanup",
        "php artisan optimize"
    ]
},
"config": {
    "preferred-install": "dist"
},

```

Note: If you switch from prefer-source (the default composer setting for non-stable packages), you should delete your vendor dir and re-download all packages, without the .git history (and greatly reducing filesize). This will also prevent questions about changed files, because packages with .git history are checked for changes.

When distributing

You can add your own rules, when you publish the config file.

```
'commands' => array(
   'name/package' => 'CHANGELOG* phpunit.xml* tests docs',
),

```

This will look for files matching `CHANGELOG*` or `phpunit.xml*` or `tests` or `docs` in vendor/name/package and delete them.

If the package is commonly used, please make a PR to add the command to src/Barryvdh/VendorCleanup/VendorCleanupCommand.php

Most of the cleanup commands are based on the SensioDistributionBundle build script;

### License

[](#license)

The Laravel Vendor Cleanup Command is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT)

###  Health Score

40

—

FairBetter than 86% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity42

Moderate usage in the ecosystem

Community24

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 73.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 ~56 days

Recently: every ~78 days

Total

9

Last Release

4336d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/dad47b02be23edb7094a151b4b1ce7e9cb56b75cd87cd3341d140e1e1e9cd0e4?d=identicon)[barryvdh](/maintainers/barryvdh)

---

Top Contributors

[![barryvdh](https://avatars.githubusercontent.com/u/973269?v=4)](https://github.com/barryvdh "barryvdh (39 commits)")[![mmodler](https://avatars.githubusercontent.com/u/1906217?v=4)](https://github.com/mmodler "mmodler (4 commits)")[![vlakoff](https://avatars.githubusercontent.com/u/544424?v=4)](https://github.com/vlakoff "vlakoff (3 commits)")[![krishatcher](https://avatars.githubusercontent.com/u/11753311?v=4)](https://github.com/krishatcher "krishatcher (3 commits)")[![beardedbrew](https://avatars.githubusercontent.com/u/942908?v=4)](https://github.com/beardedbrew "beardedbrew (2 commits)")[![GrahamCampbell](https://avatars.githubusercontent.com/u/2829600?v=4)](https://github.com/GrahamCampbell "GrahamCampbell (1 commits)")[![deviarte](https://avatars.githubusercontent.com/u/187309?v=4)](https://github.com/deviarte "deviarte (1 commits)")

---

Tags

laravelvendorcleanup

### Embed Badge

![Health badge](/badges/barryvdh-laravel-vendor-cleanup/health.svg)

```
[![Health](https://phpackages.com/badges/barryvdh-laravel-vendor-cleanup/health.svg)](https://phpackages.com/packages/barryvdh-laravel-vendor-cleanup)
```

###  Alternatives

[laravel/ai

The official AI SDK for Laravel.

1.0k3.2M203](/packages/laravel-ai)[illuminate/session

The Illuminate Session package.

9939.3M849](/packages/illuminate-session)[illuminate/queue

The Illuminate Queue package.

21332.6M1.6k](/packages/illuminate-queue)[erag/laravel-lang-sync-inertia

A powerful Laravel package for syncing and managing language translations across backend and Inertia.js (Vue/React/Svelte) frontends, offering effortless localization, auto-sync features, and smooth multi-language support for modern Laravel applications.

4925.3k](/packages/erag-laravel-lang-sync-inertia)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)[flarum/core

Delightfully simple forum software.

201.4M2.3k](/packages/flarum-core)

PHPackages © 2026

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