code: func (a *Agent) unloadServices() error {
  	for id := range a.State.Services() {
  		if err := a.removeServiceLocked(id, false); err != nil {
  			return fmt.Errorf("Failed deregistering service '%s': %v", id, err)
  		}
  	}
  	return nil
  }
docs: // unloadServices will deregister all services.