code: def remove(client, names):
      
      from renku.models.refs import LinkReference
      datasets = {name: client.dataset_path(name) for name in names}
  
      if not datasets:
          raise click.BadParameter(
              'use dataset name or identifier', param_hint='names'
          )
  
      unknown = [
          name
          for name, path in datasets.items() if not path or not path.exists()
      ]
      if unknown:
          raise click.BadParameter(
              'unknown datasets ' + ', '.join(unknown), param_hint='names'
          )
  
      datasets = set(datasets.values())
  
      with progressbar(
          datasets,
          label='Removing metadata files'.ljust(30),
          item_show_func=lambda item: str(item) if item else '',
      ) as bar:
          for dataset in bar:
              if dataset and dataset.exists():
                  dataset.unlink()
  
      with progressbar(
          list(LinkReference.iter_items(client, common_path='datasets')),
          label='Removing aliases'.ljust(30),
          item_show_func=lambda item: item.name if item else '',
      ) as bar:
          for ref in bar:
              if ref.reference in datasets:
                  ref.delete()
  
      click.secho('OK', fg='green')
docs: Delete a dataset.