def removeResource(self, resourceName, hasReleaseArg=False, releaseName=""):

    # If no organism name provided, list all organisms we have data for
    # ("gkno remove-resource")
    if resourceName == "":
      self.listRemovableResources()
      return True

    # Otherwise, make sure that gkno actually knows about this organism
    else:
      found = False
      for resource in conf.resources:
        if resource.name == resourceName:
          found = True
          break
      if not found:
        self.error.requestedUnknownResource(resourceName)
        return False

    # If no release mentioned at all, remove all releases for requested organism
    # ("gkno remove-resource X")
    if not hasReleaseArg:
      print("Removing all releases for "+resourceName%"...", end="", file=sys.stdout)
      sys.stdout.flush()
      success = self.removeAllReleases(resourceName)
      if success:
        print("done.", file=sys.stdout)
      else:
        pass
        #FIXME: error message
      return success

    # If "--release" was entered without a release name, list all of our releases for specified organism
    # ("gkno remove-resource X --release")
    if releaseName == "":
      self.listRemovableReleases(resourceName)
      return True

    # Otherwise, remove only the requested release for requested organism
    # ("gkno remove-resource X --release Y")
    else:
      print("Removing release "+releaseName+" for "+resourceName+"...", end="", file=sys.stdout)
      sys.stdout.flush()
      success = self.removeRelease(resourceName, releaseName)
      if success:
        print("done.", file=sys.stdout)
      else:
        pass
        #FIXME: error message
      return success

  # "gkno update-resource <organism>"
  #
  # Functionally equivalent to the "gkno add-resource X" operation, 
  # but provided as a command-line convenience.
dataset/ETHPy150Open gkno/gkno_launcher/src/gkno/adminUtils.py/adminUtils.removeResource/operator `+` -> `%`