PHPackages                             webmavens/laravel-storage-clear - 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. [File &amp; Storage](/categories/file-storage)
4. /
5. webmavens/laravel-storage-clear

ActiveLibrary[File &amp; Storage](/categories/file-storage)

webmavens/laravel-storage-clear
===============================

Laravel package for Clear a specific folder or all contents of a given storage disk (e.g., local, public, s3)

0.1(10mo ago)021PHP

Since Jun 21Pushed 10mo agoCompare

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

READMEChangelog (1)DependenciesVersions (2)Used By (0)

Laravel Storage Clear Command
=============================

[](#laravel-storage-clear-command)

A lightweight Laravel Artisan command to **clear the contents of a storage disk or a specific folder** inside it.
Supports local, public, S3, and any configured Laravel filesystem.

---

🛠️ Features
-----------

[](#️-features)

✅ Clear all files from a given disk.

✅ Target a specific folder within the disk for selective cleanup.

✅ Preserve .gitignore files to retain version control best practices.

✅ Use --force to skip confirmation prompts in production environments.

✅ Detailed feedback when:

```
>Disk is not configured
>Folder is not found
>Operation is skipped due to no confirmation

```

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

[](#-installation)

You can install the package via Composer:

```
composer require webmavens/storage-clear
```

⚙️ Artisan Command
------------------

[](#️-artisan-command)

```
php artisan storage:clear
```

🧾 Command Options
-----------------

[](#-command-options)

Use CaseDescriptionDefault`--disk`The storage disk to clear (`local`, `public`, `s3`, etc.)`local``--folder`The specific folder to clear within the disk (optional)`null``--force`Force the operation in production without confirmation prompt`false`📦 Usage
-------

[](#-usage)

```
php artisan storage:clear
php artisan storage:clear --disk=local
php artisan storage:clear --disk=s3 --folder=foldername
php artisan storage:clear --disk=s3 --folder=somefolder/foldername
php artisan storage:clear --disk=local --folder=foldername --force //Force the operation to run when in production

```

🧪 Sample Output
---------------

[](#-sample-output)

```
> php artisan storage:clear --disk=local --folder=staging

Cleared folder [staging] on disk [local]

```

```
> php artisan storage:clear --disk=unknown

❌ Disk [unknown] is not configured. Available disks: local,s3.

```

```
> php artisan storage:clear --disk=s3 --folder=archive

⚠️ You're running in production. Use --force to confirm.
Operation cancelled.

```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance53

Moderate activity, may be stable

Popularity3

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity26

Early-stage or recently created project

 Bus Factor1

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

###  Release Activity

Cadence

Unknown

Total

1

Last Release

325d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6e073f589fa8589f8ad99461399e6ca6de1accfb94030fb0526707e17faa8ff5?d=identicon)[webmavens](/maintainers/webmavens)

---

Top Contributors

[![webmavensteam](https://avatars.githubusercontent.com/u/66576112?v=4)](https://github.com/webmavensteam "webmavensteam (2 commits)")[![sawan-webmavens](https://avatars.githubusercontent.com/u/456840?v=4)](https://github.com/sawan-webmavens "sawan-webmavens (1 commits)")

### Embed Badge

![Health badge](/badges/webmavens-laravel-storage-clear/health.svg)

```
[![Health](https://phpackages.com/badges/webmavens-laravel-storage-clear/health.svg)](https://phpackages.com/packages/webmavens-laravel-storage-clear)
```

###  Alternatives

[knplabs/gaufrette

PHP library that provides a filesystem abstraction layer

2.5k39.8M123](/packages/knplabs-gaufrette)[google/cloud-storage

Cloud Storage Client for PHP

34390.8M125](/packages/google-cloud-storage)[illuminate/filesystem

The Illuminate Filesystem package.

15261.6M2.6k](/packages/illuminate-filesystem)[superbalist/flysystem-google-storage

Flysystem adapter for Google Cloud Storage

26320.6M30](/packages/superbalist-flysystem-google-storage)[creocoder/yii2-flysystem

The flysystem extension for the Yii framework

2931.7M62](/packages/creocoder-yii2-flysystem)[flowjs/flow-php-server

PHP library for handling chunk uploads. Works with flow.js html5 file uploads.

2451.6M15](/packages/flowjs-flow-php-server)

PHPackages © 2026

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