code: func (p *Controller) Remove(ctx context.Context) error {
  	p.logger.Debug("Remove")
  
  	pl, err := p.backend.Get(p.pluginID)
  	if err != nil {
  		if isNotFound(err) {
  			return nil
  		}
  		return err
  	}
  
  	pl.Release()
  	if pl.GetRefCount() > 0 {
  		p.logger.Debug("skipping remove due to ref count")
  		return nil
  	}
  
  	// This may error because we have exactly 1 plugin, but potentially multiple
  	// tasks which are calling remove.
  	err = p.backend.Remove(p.pluginID, &enginetypes.PluginRmConfig{ForceRemove: true})
  	if isNotFound(err) {
  		return nil
  	}
  	return err
  }
docs: // Remove is the remove phase from swarmkit