code: func (d *Driver) Remove(id string) error {
  	if id == "" {
  		return fmt.Errorf("refusing to remove the directories: id is empty")
  	}
  	d.locker.Lock(id)
  	defer d.locker.Unlock(id)
  	dir := d.dir(id)
  	lid, err := ioutil.ReadFile(path.Join(dir, "link"))
  	if err == nil {
  		if len(lid) == 0 {
  			logger.Errorf("refusing to remove empty link for layer %v", id)
  		} else if err := os.RemoveAll(path.Join(d.home, linkDir, string(lid))); err != nil {
  			logger.Debugf("Failed to remove link: %v", err)
  		}
  	}
  
  	if err := system.EnsureRemoveAll(dir); err != nil && !os.IsNotExist(err) {
  		return err
  	}
  	return nil
  }
docs: // Remove cleans the directories that are created for this id.