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)16852.6k↓66.7%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 1mo ago

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

41

—

FairBetter than 89% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity43

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

4283d 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

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M687](/packages/barryvdh-laravel-ide-helper)[wnx/laravel-stats

Get insights about your Laravel Project

1.8k1.8M7](/packages/wnx-laravel-stats)[tightenco/jigsaw

Simple static sites with Laravel's Blade.

2.2k438.5k29](/packages/tightenco-jigsaw)[laravel-zero/framework

The Laravel Zero Framework.

3371.4M369](/packages/laravel-zero-framework)[aedart/athenaeum

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

245.2k](/packages/aedart-athenaeum)[laragear/preload

Effortlessly make a Preload script for your Laravel application.

119363.5k](/packages/laragear-preload)

PHPackages © 2026

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