code: def del_repo(repo, root=None):
      '''
      Delete a repo.
  
      root
          operate on a different root directory.
  
      CLI Examples:
  
      .. code-block:: bash
  
          salt '*' pkg.del_repo alias
      '''
      repos_cfg = _get_configured_repos(root=root)
      for alias in repos_cfg.sections():
          if alias == repo:
              doc = __zypper__(root=root).xml.call('rr', '--loose-auth', '--loose-query', alias)
              msg = doc.getElementsByTagName('message')
              if doc.getElementsByTagName('progress') and msg:
                  return {
                      repo: True,
                      'message': msg[0].childNodes[0].nodeValue,
                  }
  
      raise CommandExecutionError('Repository \'{0}\' not found.'.format(repo)f del_repo(repo, root=None):
      '''
      Delete a repo.
  
      root
          operate on a different root directory.
  
      CLI Examples:
  
      .. code-block:: bash
  
          salt '*' pkg.del_repo alias
      '''
      repos_cfg = _get_configured_repos(root=root)
      for alias in repos_cfg.sections():
          if alias == repo:
              doc = __zypper__(root=root).xml.call('rr', '--loose-auth', '--loose-query', alias)
              msg = doc.getElementsByTagName('message')
              if doc.getElementsByTagName('progress') and msg:
                  return {
                      repo: True,
                      'message': msg[0].childNodes[0].nodeValue,
                  }
  
      raise CommandExecutionError('Repository \'{0}\' not found.'.format(repo))
docs: Delete a repo.
  
      root
          operate on a different root directory.
  
      CLI Examples:
  
      .. code-block:: bash
  
          salt '*' pkg.del_repo alias