PHPackages                             aoropeza/logcleaner - 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. [DevOps &amp; Deployment](/categories/devops)
4. /
5. aoropeza/logcleaner

ActiveMagento2-module[DevOps &amp; Deployment](/categories/devops)

aoropeza/logcleaner
===================

Automated log directory cleanup for Magento 2 based on file count limits.

001PHP

Since Jan 19Pushed 3mo agoCompare

[ Source](https://github.com/adolforopeza/LogCleaner)[ Packagist](https://packagist.org/packages/aoropeza/logcleaner)[ RSS](/packages/aoropeza-logcleaner/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

LogCleaner for Magento 2
========================

[](#logcleaner-for-magento-2)

Automated log and directory cleanup module for Magento 2. This module allows you to automatically clean up specific directories within the `var` folder based on configured capacity limits or schedules.

Features
--------

[](#features)

- **Automated Cleanup**: run cleanup jobs via Magento Cron.
- **Capacity Management**: Configure a maximum capacity (e.g., 1GB) for directories. If a directory exceeds this size, it will be emptied.
- **Selective Cleanup**: Choose which subdirectories within `var/` to include in the cleanup process.
- **Configurable Frequency**: Set the cron schedule expression directly from the admin panel.

Installation
------------

[](#installation)

### Composer

[](#composer)

1. Required the module via composer: ```
    composer require aoropeza/logcleaner
    ```
2. Enable the module: ```
    bin/magento module:enable Aoropeza_LogCleaner
    ```
3. Upgrade setup: ```
    bin/magento setup:upgrade
    ```
4. Compile and deploy (if in production): ```
    bin/magento setup:di:compile
    bin/magento setup:static-content:deploy
    ```

### Manual Installation

[](#manual-installation)

1. Extract the extension to `app/code/Aoropeza/LogCleaner`.
2. Run the enable commands as above.

Configuration
-------------

[](#configuration)

Navigate to **Store &gt; Configuration &gt; Dev Oropeza &gt; Log Directory**.

### General

[](#general)

- **Enable**: Enable or disable the module functionalities.
- **Directory Capacity**: Enable to check directory size before cleaning.
- **Directory Size**: (If enabled above) set the size threshold (e.g., `1GB`, `500MB`). If a directory exceeds this size, it will be cleaned.
- **Backup Directory**: Enable to create a zip backup of the directory before deletion. backups are stored in `var/backups/`.
- **Frequency**: Cron expression for how often the check runs (e.g., `* * * * *` for every minute, `0 2 * * *` for daily at 2 AM).

### Folders to Clean

[](#folders-to-clean)

- **Folders**: Select which folders within the `var` directory should be monitored and cleaned.

Copyright &amp; License
-----------------------

[](#copyright--license)

Copyright © 2026 Adolfo Oropeza. All rights reserved.

This project is licensed under the MIT License - see the [LICENSE](LICENSE.md) file for details.

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance56

Moderate activity, may be stable

Popularity1

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity12

Early-stage or recently created project

 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/bd2359bca4631955f340caa9b665251084f8d793995fbce715e8a0b5faaad257?d=identicon)[adolforopeza](/maintainers/adolforopeza)

---

Top Contributors

[![adolforopeza](https://avatars.githubusercontent.com/u/3385221?v=4)](https://github.com/adolforopeza "adolforopeza (8 commits)")

---

Tags

cronjobdevopslog-cleanermagentomagento-extensionmagento2optimizationphp

### Embed Badge

![Health badge](/badges/aoropeza-logcleaner/health.svg)

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

###  Alternatives

[deployer/deployer

Deployment Tool

11.0k25.4M206](/packages/deployer-deployer)[appwrite/server-ce

End to end backend server for frontend and mobile apps.

55.3k84.2k](/packages/appwrite-server-ce)[pragmarx/health

Laravel Server &amp; App Health Monitor and Notifier

2.0k1.0M2](/packages/pragmarx-health)[felixfbecker/language-server-protocol

PHP classes for the Language Server Protocol

22476.7M6](/packages/felixfbecker-language-server-protocol)[heroku/heroku-buildpack-php

Toolkit for starting a PHP application locally, with or without foreman, using the same config for PHP and Apache2/Nginx as on Heroku

8161.3M10](/packages/heroku-heroku-buildpack-php)[tiamo/phpas2

PHPAS2 is a php-based implementation of the EDIINT AS2 standard

4674.7k](/packages/tiamo-phpas2)

PHPackages © 2026

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