protected function cleanupVendorDir($dir)
    {
        if (is_link($link = "$dir/vendor/yiisoft/yii2")) {
            $this->stdout("Removing symlink $link.\n");
            FileHelper::unlink($link);
        }
        $extensions = $this->findDirs("$dir/vendor/yiisoft");
        foreach ($extensions as $ext) {
            if (is_link($link = "$dir/vendor/yiisoft/yii2-$ext")) {
                $this->stdout("Removing symlink $link.\n");
                FileHelper::unlink($link);
            }
        }
    }