def _cleanup_server_profile(self, retries, attempt=1):
        log.info('cleanup-server', name=self.name,
                 profile=self._server_profile_name,
                 attempt=attempt, remaining=retries)

        if self._server_profile_name is not None:
            try:
                profile = self.delete_server_profile_xml
                yield self._handler.netconf_client.edit_config(profile)
                self._server_profile_name = None

            except Exception as e:
                log.exception(e.message)
                if retries > 0:
                    reactor.callLater(attempt * 60, self._cleanup_download_job,
                                      retries - 1, attempt + 1)