protected function removeFailedRelease($worker, AbstractAuth $auth, $remote, $releaseDirname = null)
    {
        $releaseDir = is_null($releaseDirname)
            ? $remote['releasesdir'] . '/' . $remote['time']
            : $releaseDirname;
        return $this->taskSsh($worker, $auth)
            ->remoteDirectory($remote['rootdir'], true)
            ->exec('chown -R ' . $remote['user'] . ':' . $remote['user'] . ' ' . $releaseDir)
            ->exec('chmod -R a+rwx ' . $releaseDir)
            ->exec('rm -rf ' . $releaseDir);
    }