public function actionDeleteUnused()
    {
        $articeThumb = [];
        $rootPath = yii::getAlias('@frontend/web');
        foreach (Article::find()->where(['<>', 'thumb', ''])->each(100) as $artice) {
            $articeThumb[] = str_replace(yii::$app->params['site']['url'], $rootPath, $artice->thumb);
        }

        $articleContent = [];
        foreach (ArticleContent::find()->where(['<>', 'content', ''])->each(100) as $content) {
            $content->content = str_replace(yii::$app->params['site']['url'], yii::$app->params['site']['sign'], $content->content);
            preg_match_all('/<img.*src="(' . yii::$app->params['site']['sign'] . '.*)"/isU', $content->content, $matches);
            if (! empty($matches[1])) {
                foreach ($matches[1] as $pic) {
                    $articleContent[] = str_replace(yii::$app->params['site']['sign'], $rootPath, $pic);
                }
            }
        }

        $friendlink = [];
        foreach (FriendlyLink::find()->where(['<>', 'image', ''])->each(100) as $link) {
            $friendlink[] = $rootPath . $link->image;
        }

        $this->unusedFiles = array_merge($articeThumb, $articleContent, $friendlink);

        $this->_deleteFileRecursive(yii::getAlias('@uploads'));

    }