PHPackages                             milax/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. milax/cleaner

Abandoned → [misterpaladin/cleaner](/?search=misterpaladin%2Fcleaner)Library[Utility &amp; Helpers](/categories/utility)

milax/cleaner
=============

Garbage cleaner package for Laravel

1.0.9(8y ago)035MITPHP

Since May 8Pushed 8y ago2 watchersCompare

[ Source](https://github.com/milaxcom/cleaner)[ Packagist](https://packagist.org/packages/milax/cleaner)[ RSS](/packages/milax-cleaner/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependenciesVersions (11)Used By (0)

Cleaner
=======

[](#cleaner)

[![Latest Stable Version](https://camo.githubusercontent.com/0285aeda49f6cfb81c45bf1835b6d94ba939100654adc713ef0ca36f2f0d7060/68747470733a2f2f706f7365722e707567782e6f72672f6d697374657270616c6164696e2f636c65616e65722f762f737461626c65)](https://packagist.org/packages/misterpaladin/cleaner) [![Total Downloads](https://camo.githubusercontent.com/8522a5160bbb4d0cfa6976e375585f6bcd89bc34179a2a3fc130a4516b544f05/68747470733a2f2f706f7365722e707567782e6f72672f6d697374657270616c6164696e2f636c65616e65722f646f776e6c6f616473)](https://packagist.org/packages/misterpaladin/cleaner) [![Latest Unstable Version](https://camo.githubusercontent.com/feb6943148f7ea2fcae3cd2823562a0a31cee6a829164facfc81afffbc6230fb/68747470733a2f2f706f7365722e707567782e6f72672f6d697374657270616c6164696e2f636c65616e65722f762f756e737461626c65)](https://packagist.org/packages/misterpaladin/cleaner) [![License](https://camo.githubusercontent.com/cbe03a3e7545ea6aad46aefd658aa4659a0831ae1e4ecfaf314b7a3f3970eaf9/68747470733a2f2f706f7365722e707567782e6f72672f6d697374657270616c6164696e2f636c65616e65722f6c6963656e7365)](https://packagist.org/packages/misterpaladin/cleaner)

Garbage cleaner package for Laravel

Usage
-----

[](#usage)

Install package:

```
$ composer require misterpaladin/cleaner
```

Publish config file to your project:

```
$ php artisan vendor:publish --tag=cleaner
```

Add `MisterPaladin\Cleaner\CleanerServiceProvider` to your `config/app.php` providers array

### Configuration

[](#configuration)

`/config/cleaner.php` file contents:

```
return [

    // Delete file after 3 days and 12 hours
    [
        'path' => 'path/to/file.ext',
        'expires' => [
            'days' => 3,
            'hours' => 12,
        ],
    ],

    // Delete directory after 30 minutes
    [
        'path' => 'path/to/directory',
        'expires' => [
            'minutes' => 10,
        ],
    ],

    // Delete directory contents after 1 week
    [
        'path' => 'path/to/directory/*',
        'expires' => [
            'weeks' => 1,
        ],
    ]

    // Define a path array
    [
        'path' => [
            'path/to/file.ext',
            'path/to/directory',
            'path/to/directory/*',
        ],
        'expires' => [
            'weeks' => 1,
        ],
    ]

];
```

The `expires` option may accept:

- seconds
- minutes
- hours
- days
- weeks
- months
- years

### Callbaks

[](#callbaks)

```
[
    'path' => 'path/to/file.ext',
    'expires' => [
        'days' => 3,
        'hours' => 12,
    ],
    'before' => function ($path) {
        // Execute before deleting the file
    },
    'after' => function ($path) {
        // Execute after deleting the file
    },
],
```

### Execution

[](#execution)

Cleaner runs every minute (if you set it up: )

Manual run: `php artisan cleaner:run`

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity69

Established project with proven stability

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 ~53 days

Total

10

Last Release

3227d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/432327?v=4)[Yevhen Kuzmin](/maintainers/Milax)[@milax](https://github.com/milax)

### Embed Badge

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

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

PHPackages © 2026

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