PHPackages                             topfloor2/composer-cleanup-vcs-dirs - 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. topfloor2/composer-cleanup-vcs-dirs

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

topfloor2/composer-cleanup-vcs-dirs
===================================

Automatically deletes .git directories in newly installed or updated dependencies.

02PHP

Since May 7Pushed 2y agoCompare

[ Source](https://github.com/liuchenrang/composer-cleanup-vcs-dirs)[ Packagist](https://packagist.org/packages/topfloor2/composer-cleanup-vcs-dirs)[ RSS](/packages/topfloor2-composer-cleanup-vcs-dirs/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

composer-cleanup-vcs-dirs
=========================

[](#composer-cleanup-vcs-dirs)

If you're stuck needing to commit your composer dependencies, you might find you need to delete some extra .git directories after every time you install or update something with Composer.

While not a best practice, sometimes it's simply a requirement.

How to use the plugin
---------------------

[](#how-to-use-the-plugin)

When required in composer.json, the plugin will automatically search for any .git directories in installed or updated dependencies and delete them immediately.

There's nothing else you need to do after requiring this plugin in your main composer.json file.

Running the command directly
----------------------------

[](#running-the-command-directly)

You can also run the cleanup-vcs-dirs command directly in Composer.

To do so, simply run:

```
composer cleanup-vcs-dirs

```

Your entire project will be scanned, and all child .git directories under the project directory will be deleted.

composer config

```
    "post-install-cmd": [
      "composer cleanup-vcs-dirs"
    ],
    "post-update-cmd": [
      "composer cleanup-vcs-dirs"
    ],
```

###  Health Score

12

—

LowBetter than 0% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity2

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity18

Early-stage or recently created project

 Bus Factor1

Top contributor holds 73.7% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/4ce10d2147f714ea78a7b1845a1747cdf9b6c7dbebd3120d9ec819251906785b?d=identicon)[xinghuo](/maintainers/xinghuo)

---

Top Contributors

[![ReplicaObscura](https://avatars.githubusercontent.com/u/277977?v=4)](https://github.com/ReplicaObscura "ReplicaObscura (14 commits)")[![liuchenrang](https://avatars.githubusercontent.com/u/2784214?v=4)](https://github.com/liuchenrang "liuchenrang (3 commits)")[![jacks0n](https://avatars.githubusercontent.com/u/469696?v=4)](https://github.com/jacks0n "jacks0n (2 commits)")

### Embed Badge

![Health badge](/badges/topfloor2-composer-cleanup-vcs-dirs/health.svg)

```
[![Health](https://phpackages.com/badges/topfloor2-composer-cleanup-vcs-dirs/health.svg)](https://phpackages.com/packages/topfloor2-composer-cleanup-vcs-dirs)
```

###  Alternatives

[adoy/fastcgi-client

Lightweight, single file FastCGI client for PHP.

3142.6M9](/packages/adoy-fastcgi-client)[willvincent/feeds

Laravel Service Provider for the SimplePie library

3131.5M2](/packages/willvincent-feeds)[voku/stringy

A string manipulation library with multibyte support

1783.8M19](/packages/voku-stringy)[anthonymartin/geo-location

Powerful GeoCoding library: Retrieve bounding box coordinates, distances between geopoints, point in polygon, get longitude and latitude from addresses and more with GeoLocation for PHP

196949.5k5](/packages/anthonymartin-geo-location)[backpack/basset

Dead-simple way to load CSS or JS assets only once per page, when using Laravel 10+.

202832.4k6](/packages/backpack-basset)[codeigniter4/settings

Settings library for CodeIgniter 4

93499.3k24](/packages/codeigniter4-settings)

PHPackages © 2026

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