protected function cleanDirsTask($worker, AbstractAuth $auth, $remote)
    {
        $cleandirLimit = isset($remote['cleandir_limit']) ? max(1, $remote['cleandir_limit']) : '';

        $task = $this->taskSsh($worker, $auth)
            ->remoteDirectory($remote['rootdir'], true)
            ->timeout($this->getTimeoutSetting('clean_dir'))
            ->exec('vendor/bin/robo digipolis:clean-dir ' . $remote['releasesdir'] . ($cleandirLimit ? ':' . $cleandirLimit : ''));

        if ($remote['createbackup']) {
            $task->exec('vendor/bin/robo digipolis:clean-dir ' . $remote['backupsdir'] . ($cleandirLimit ? ':' . --$cleandirLimit : ''));
        }

        return $task;
    }