code: func (r *EtcdRegistry) RemoveUnitState(jobName string) error {
  	// TODO(jonboulle): consider https://github.com/coreos/fleet/issues/465
  	legacyKey := r.legacyUnitStatePath(jobName)
  	_, err := r.kAPI.Delete(context.Background(), legacyKey, nil)
  	if err != nil && !isEtcdError(err, etcd.ErrorCodeKeyNotFound) {
  		return err
  	}
  
  	// TODO(jonboulle): deal properly with multiple states
  	newKey := r.unitStatesNamespace(jobName)
  	opts := &etcd.DeleteOptions{
  		Recursive: true,
  	}
  	_, err = r.kAPI.Delete(context.Background(), newKey, opts)
  	if err != nil && !isEtcdError(err, etcd.ErrorCodeKeyNotFound) {
  		return err
  	}
  	return nil
  }
docs: // Delete the state from the Registry for the given Job's Unit