PHPackages                             omaralalwi/laravel-trash-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. omaralalwi/laravel-trash-cleaner

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

omaralalwi/laravel-trash-cleaner
================================

clean logs and debug files (clockwork , laravel telescope and more)

1.0.4(10mo ago)221.8k2[1 issues](https://github.com/omaralalwi/laravel-trash-cleaner/issues)MITPHPPHP ^7.4|^8.1|^8.2|^8.3|^8.4

Since Jun 8Pushed 10mo ago1 watchersCompare

[ Source](https://github.com/omaralalwi/laravel-trash-cleaner)[ Packagist](https://packagist.org/packages/omaralalwi/laravel-trash-cleaner)[ Docs](https://github.com/omaralalwi/laravel-trash-cleaner)[ RSS](/packages/omaralalwi-laravel-trash-cleaner/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (5)DependenciesVersions (9)Used By (0)

Laravel Trash Cleaner
=====================

[](#laravel-trash-cleaner)

 [ ![Laravel Trash Cleaner](https://raw.githubusercontent.com/omaralalwi/laravel-trash-cleaner/master/public/images/laravel-trash-cleaner.jpg) ](https://github.com/omaralalwi/laravel-trash-cleaner)

**Laravel Trash Cleaner** is a lightweight and powerful utility package that helps you keep your Laravel application clean and performant by:

- 🧹 Deleting debug and log files (Clockwork, Debugbar).
- ⚡ Clearing compiled view caches and frontend build directories.
- 🛠️ Optionally rebuilding frontend assets using tools like `npm`, `yarn`, or `pnpm`.

[![Trash Cleaner Screenshot](https://raw.githubusercontent.com/omaralalwi/laravel-trash-cleaner/master/public/images/trash-screen-shot.png)](https://raw.githubusercontent.com/omaralalwi/laravel-trash-cleaner/master/public/images/trash-screen-shot.png)

[![Trash Assets Cleaner Screenshot](https://raw.githubusercontent.com/omaralalwi/laravel-trash-cleaner/master/public/images/trash-assets-screen-shot.png)](https://raw.githubusercontent.com/omaralalwi/laravel-trash-cleaner/master/public/images/trash-assets-screen-shot.png)

---

🚀 Installation
--------------

[](#-installation)

Install the package via Composer:

```
composer require omaralalwi/laravel-trash-cleaner
```

### 🔧 Publish Configuration

[](#-publish-configuration)

Optionally, publish the configuration file to customize paths and build settings:

```
php artisan vendor:publish --tag=laravel-trash-cleaner
```

---

🧹 Usage
-------

[](#-usage)

### 🔸 Clean Debug Files

[](#-clean-debug-files)

Cleans out `storage/debugbar` and `storage/clockwork` folders with a progress bar:

```
php artisan trash:clean
```

### 🔸 Clean Asset Folders

[](#-clean-asset-folders)

Removes frontend-related build caches and compiled view files based on your config:

```
php artisan trash:clean-assets
```

### 🔸 Clean + Rebuild Frontend (Optional)

[](#-clean--rebuild-frontend-optional)

Use the `--build` flag to also run your frontend build steps (`npm install && npm run build` or equivalent):

```
php artisan trash:clean-assets --build
```

This is ideal for resetting the build process after switching branches, clearing corrupted caches, or deploying updates.

---

### customize Assets paths &amp; commnds

[](#customize-assets-paths---commnds)

> **Note:** You can fully customize the asset cleanup paths and build commands in the configuration file. For example, if you're using **`pnpm`** instead of the default **`npm`**, make sure to update the config key to `'package_manager' => 'pnpm'`.

---

⏰ Scheduling Automatic Cleanup
------------------------------

[](#-scheduling-automatic-cleanup)

To automate cleanup using Laravel's scheduler:

1. Enable it in your config:

```
'schedule' => true,
'frequency' => 'daily',
```

2. Ensure Laravel's scheduler is running via cron:

```
* * * * * cd /path-to-your-project && php artisan schedule:run >> /dev/null 2>&1
```

---

🤝 Contributing
--------------

[](#-contributing)

Contributions are welcome! Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

---

🛡️ Security
-----------

[](#️-security)

If you discover any security vulnerabilities, please contact:

---

📄 License
---------

[](#-license)

Licensed under the [MIT License](LICENSE.md).

---

📚 Helpful Open Source Packages
------------------------------

[](#-helpful-open-source-packages)

- [![lexi translate](https://raw.githubusercontent.com/omaralalwi/lexi-translate/master/public/images/lexi-translate-banner.jpg) Lexi Translate ](https://github.com/omaralalwi/lexi-translate) simplify managing translations for multilingual Eloquent models with power of morph relationships and caching .
- [![laravel Taxify](https://raw.githubusercontent.com/omaralalwi/Gpdf/master/public/images/gpdf-banner-bg.jpg) Gpdf ](https://github.com/omaralalwi/Gpdf) Open Source HTML to PDF converter for PHP &amp; Laravel Applications, supports Arabic content out-of-the-box and other languages..
- [![laravel Taxify](https://raw.githubusercontent.com/omaralalwi/laravel-taxify/master/public/images/taxify.jpg) **laravel Taxify** ](https://github.com/omaralalwi/laravel-taxify) Laravel Taxify provides a set of helper functions and classes to simplify tax (VAT) calculations within Laravel applications.
- [![laravel Deployer](https://raw.githubusercontent.com/omaralalwi/laravel-deployer/master/public/images/deployer.jpg) **laravel Deployer** ](https://github.com/omaralalwi/laravel-deployer) Streamlined Deployment for Laravel and Node.js apps, with Zero-Downtime and various environments and branches.
- [![laravel Trash Cleaner](https://raw.githubusercontent.com/omaralalwi/laravel-time-craft/master/public/images/laravel-time-craft.jpg) **laravel Time Craft** ](https://github.com/omaralalwi/laravel-time-craft)simple trait and helper functions that allow you, Effortlessly manage date and time queries in Laravel apps.
- [![Laravel Startkit](https://raw.githubusercontent.com/omaralalwi/laravel-startkit/master/public/screenshots/backend-rtl.png) **Laravel Startkit** ](https://github.com/omaralalwi/laravel-startkit) Laravel Admin Dashboard, Admin Template with Frontend Template, for scalable Laravel projects.

###  Health Score

43

—

FairBetter than 91% of packages

Maintenance53

Moderate activity, may be stable

Popularity30

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 96% 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 ~96 days

Total

5

Last Release

317d ago

PHP version history (2 changes)1.0.0PHP ^7.4|^8.1|^8.2|^8.3

1.0.3PHP ^7.4|^8.1|^8.2|^8.3|^8.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/46733da79a34ff686b036a09af1dcc6d21054aee25a5e029500dc87d3c69ba89?d=identicon)[WatheqAlshowaiter](/maintainers/WatheqAlshowaiter)

![](https://www.gravatar.com/avatar/92882431481b621f6509ff259dd600e327c27fc77adcba4fcc7177659059c9a8?d=identicon)[omaralalwi](/maintainers/omaralalwi)

---

Top Contributors

[![omaralalwi](https://avatars.githubusercontent.com/u/25439498?v=4)](https://github.com/omaralalwi "omaralalwi (24 commits)")[![A909M](https://avatars.githubusercontent.com/u/119125167?v=4)](https://github.com/A909M "A909M (1 commits)")

---

Tags

cleanclean-logsclear-debug-filesclear-log-filesclockworkdebug-fileslaravellaravel-cleanlaravel-cleanerlaravel-performancelaravel-speed-uplaravel-trashlogs-filestelescopeschedulerlaraveldebugbarlaravel-packagevitelaravel-toolyarntelescopeprogress barartisan-commandClockworkLaravel Utilitiesclear cacheomaralalwiphp-packagelog filessystem performancelaravel maintenancecache cleanerpnpmlaravel-trash-cleanerDisk SpaceLog Rotationbuild cleanupdebug cleanuplog cleanupstorage cleanupoptimize laravellaravel cleanercleanup commandfrontend buildnpm buildnpm cachepnpm cachefile cleanerautomated cleanupapplication healthenvironment optimization

### Embed Badge

![Health badge](/badges/omaralalwi-laravel-trash-cleaner/health.svg)

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

###  Alternatives

[realrashid/sweet-alert

Laravel Sweet Alert Is A Package For Laravel Provides An Easy Way To Display Alert Messages Using The SweetAlert2 Library.

1.2k2.9M21](/packages/realrashid-sweet-alert)[imanghafoori/laravel-nullable

A package to help you write expressive defensive code in a functional manner

151423.7k6](/packages/imanghafoori-laravel-nullable)[guanguans/laravel-soar

SQL optimizer and rewriter for laravel. - laravel 的 SQL 优化器和重写器。

2227.8k](/packages/guanguans-laravel-soar)[paxha/laravel-reportable

This Laravel Eloquent extension provides record according to dates using models.

111.2k](/packages/paxha-laravel-reportable)

PHPackages © 2026

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