PHPackages                             assayer-pro/yii2-asset-clean - 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. assayer-pro/yii2-asset-clean

ActiveYii2-extension[CLI &amp; Console](/categories/cli)

assayer-pro/yii2-asset-clean
============================

Yii2 console command to clean web/assets/ directory

1.0.5(10y ago)24812MITPHP

Since Oct 27Pushed 10y ago2 watchersCompare

[ Source](https://github.com/assayer-pro/yii2-asset-clean)[ Packagist](https://packagist.org/packages/assayer-pro/yii2-asset-clean)[ Docs](https://github.com/assayer-pro/yii2-asset-clean)[ RSS](/packages/assayer-pro-yii2-asset-clean/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (4)Versions (8)Used By (0)

Yii2 console command to clean web/assets/ directory
===================================================

[](#yii2-console-command-to-clean-webassets-directory)

This extension added command 'asset/clean' to console application for removes caches from Yii's web/assets/ directory.

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

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
$ composer require assayer-pro/yii2-asset-clean:dev-master
```

or add

```
"assayer-pro/yii2-asset-clean": "dev-master"

```

to the `require` section of your `composer.json` file.

Usage
-----

[](#usage)

To use this extension, add the following code in your application configuration (console.php):

```
'controllerMap' => [
    'asset' => [
        'class' => 'assayer-pro\assetClean\AssetController',
    ],
],
```

Then call the extension from the command line

```
/path/yii/web/assets$ ls -l
total 4
lrwxrwxrwx 1 www-data www-data 58 Oct 27 17:49 114607b9 -> /path/yii/vendor/bower/some-package
lrwxrwxrwx 1 www-data www-data 65 Oct 27 17:49 2466e1a -> /path/yii/vendor/bower/some-package2
lrwxrwxrwx 1 www-data www-data 50 Oct 27 17:49 420da4e -> /path/yii/vendor/yiisoft/yii2/assets
lrwxrwxrwx 1 www-data www-data 55 Oct 27 17:49 85c56229 -> /path/yii/vendor/fortawesome/font-awesome
lrwxrwxrwx 1 www-data www-data 56 Oct 27 17:49 e8db1cdd -> /path/yii/vendor/yiisoft/yii2-debug/assets

/path/yii$ php yii asset/clean
Cleaning assets dir...
removed /path/yii/web/assets/114607b9, last modified Oct 27, 2015, 2:55:06 PM
removed /path/yii/web/assets/2466e1a, last modified Oct 12, 2015, 11:08:59 AM
removed /path/yii/web/assets/420da4e, last modified Mar 30, 2015, 7:50:00 AM
removed /path/yii/web/assets/85c56229, last modified Apr 28, 2015, 4:03:04 PM
removed /path/yii/web/assets/e8db1cdd, last modified Aug 6, 2015, 4:14:06 PM
Done. Assets dir cleaned
```

For ignore some directories add ignoreDirs property, e.g.

```
'controllerMap' => [
    'asset' => [
        'class' => 'assayer-pro\assetClean\AssetController',
        'ignoreDirs' => ['js', 'css'],
    ],
],
```

Additional arguments
--------------------

[](#additional-arguments)

```
--assetsDir: string (defaults to '@webroot/assets')
  assets cached directory

--quiet: boolean, 0 or 1 (defaults to 0)
  quiet;  do  not  write  anything to standard output.

--verbose: boolean, 0 or 1 (defaults to 0)
  echo rules being run, dir/file being deleted

```

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

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

Total

6

Last Release

3761d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c8d4c8523235a0cdf2e362f2e5706e31ce3b6257ad9f2856421df383c7a615a8?d=identicon)[assayer-pro](/maintainers/assayer-pro)

---

Top Contributors

[![serge-larin](https://avatars.githubusercontent.com/u/6086715?v=4)](https://github.com/serge-larin "serge-larin (30 commits)")[![scrutinizer-auto-fixer](https://avatars.githubusercontent.com/u/6253494?v=4)](https://github.com/scrutinizer-auto-fixer "scrutinizer-auto-fixer (2 commits)")

###  Code Quality

TestsCodeception

### Embed Badge

![Health badge](/badges/assayer-pro-yii2-asset-clean/health.svg)

```
[![Health](https://phpackages.com/badges/assayer-pro-yii2-asset-clean/health.svg)](https://phpackages.com/packages/assayer-pro-yii2-asset-clean)
```

###  Alternatives

[samdark/yii2-webshell

A web shell that allows to run yii console commands and create your own commands.

22981.5k1](/packages/samdark-yii2-webshell)[fedemotta/yii2-cronjob

Yii2 extension to help in the creation of automated console scripts

2233.5k](/packages/fedemotta-yii2-cronjob)[trntv/yii2-tactician

A simple, flexible command bus. This package provide it's integration with Yii2

1458.3k](/packages/trntv-yii2-tactician)

PHPackages © 2026

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