PHPackages                             genkgo/srvcleaner - 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. [CLI &amp; Console](/categories/cli)
4. /
5. genkgo/srvcleaner

AbandonedArchivedLibrary[CLI &amp; Console](/categories/cli)

genkgo/srvcleaner
=================

CLI tool to clean up your server (e.g. remove files and directories that are overdue)

06PHP

Since Feb 9Pushed 8y ago3 watchersCompare

[ Source](https://github.com/genkgo/srvcleaner)[ Packagist](https://packagist.org/packages/genkgo/srvcleaner)[ RSS](/packages/genkgo-srvcleaner/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

srvcleaner
==========

[](#srvcleaner)

CLI tool to clean up your server (e.g. remove files and directories that are overdue)

### Installation

[](#installation)

Requires PHP 5.5 or later. There are no plans to support PHP 5.4 or PHP 5.3. In case this is an obstacle for you, conversion should be no problem. The library is very small.

It is installable and autoloadable via Composer as [genkgo/srvcleaner](https://packagist.org/packages/genkgo/srvcleaner).

### Quality

[](#quality)

[![Scrutinizer Code Quality](https://camo.githubusercontent.com/86cc4d1404288854703a825f3dcca7ecff64733745b4ef67f73638f2c64c6461/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f67656e6b676f2f737276636c65616e65722f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/genkgo/srvcleaner/)[![Code Coverage](https://camo.githubusercontent.com/dbc5f76191c6a74d5a9016e0901109850cfe5bd49061676cc26319d23587b3a8/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f67656e6b676f2f737276636c65616e65722f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/genkgo/srvcleaner/)[![Build Status](https://camo.githubusercontent.com/30e3f8a2250b14930b28b68216462fb90b7d93871cb53106a974810bc53acad1/68747470733a2f2f7472617669732d63692e6f72672f67656e6b676f2f737276636c65616e65722e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/genkgo/srvcleaner)

To run the unit tests at the command line, issue `phpunit -c tests/`. [PHPUnit](http://phpunit.de/manual/) is required.

This library attempts to comply with [PSR-1](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-1-basic-coding-standard.md), [PSR-2](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md), and [PSR-4](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-4-autoloader.md). If you notice compliance oversights, please send a patch via pull request.

Getting Started
---------------

[](#getting-started)

### Build your phar

[](#build-your-phar)

```
vendor/bin/box build -c box.json

```

### Create a config file

[](#create-a-config-file)

The config containing your cleanup tasks. Remove directories (including contents) or remove files.

```
{
  "name": "Test Cleaner",
  "tasks": [{
      "name" : "removeTmp",
      "src": "CleanUpDirectories",
      "config": {
        "path": "/tmp",
        "match": ["srvcleaner*"]
      }
    },{
      "name" : "removeTmp",
      "src": "CleanUpFiles",
      "config": {
        "path": "/tmp",
        "match": ["*.tmp"]
      }
    }
  ]
}
```

If you are removing backups that are overdue, use the following settings to remove backups older than 30 days.

```
{
  "name": "Test Cleaner",
  "tasks": [{
      "name" : "removeTmp",
      "src": "CleanUpFiles",
      "config": {
        "path": "/tmp",
        "match": ["*.tar.gz"],
        "modifiedAt": "P30D"
      }
    }
  ]
}
```

### Run the command

[](#run-the-command)

```
phar/srvcleaner.phar clean -c srvcleaner.json

```

Contributing
------------

[](#contributing)

- Found a bug? Please try to solve it yourself first and issue a pull request. If you are not able to fix it, at least give a clear description what goes wrong. We will have a look when there is time.
- Want to see a feature added, issue a pull request and see what happens. You could also file a bug of the missing feature and we can discuss how to implement it.

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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/9d827a1c73491b0599e518a1a1bac8aa5cb07a4e3a68fcf90bfd05959ae6d302?d=identicon)[frederikbosch](/maintainers/frederikbosch)

---

Top Contributors

[![frederikbosch](https://avatars.githubusercontent.com/u/1552577?v=4)](https://github.com/frederikbosch "frederikbosch (23 commits)")

### Embed Badge

![Health badge](/badges/genkgo-srvcleaner/health.svg)

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

###  Alternatives

[wp-cli/wp-cli

WP-CLI framework

5.0k17.2M320](/packages/wp-cli-wp-cli)[consolidation/annotated-command

Initialize Symfony Console commands from annotated command class methods.

22569.8M19](/packages/consolidation-annotated-command)[chi-teck/drupal-code-generator

Drupal code generator

26947.8M5](/packages/chi-teck-drupal-code-generator)[seld/cli-prompt

Allows you to prompt for user input on the command line, and optionally hide the characters they type

24725.8M17](/packages/seld-cli-prompt)[illuminate/console

The Illuminate Console package.

12944.1M5.1k](/packages/illuminate-console)[php-tui/php-tui

Comprehensive TUI library heavily influenced by Ratatui

589747.0k6](/packages/php-tui-php-tui)

PHPackages © 2026

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