// Remove removes the container.
772625
func (c *Container) Remove(ctx context.Context, removeVolume bool) error {
	return c.client.ContainerRemove(ctx, c.container.ID, types.ContainerRemoveOptions{
		Force:         true,
		RemoveVolumes: removeVolume,
	})
}
34913
func (t *File) Remove(ctx context.Context) error {
	_ = t.Close()
	if err := t.unmount(ctx); err != nil {
		return errors.Errorf("Failed to unmount %s from %s: %s", t.dev, t.dir, err)
	}
	if t.dir == "" {
		return nil
	}
	return os.RemoveAll(t.dir)
}
587943
func (s *Service) Delete(ctx context.Context, options options.Delete) error {
	return s.collectContainersAndDo(ctx, func(c *container.Container) error {
		running := c.IsRunning(ctx)
		if !running || options.RemoveRunning {
			return c.Remove(ctx, options.RemoveVolume)
		}
		return nil
	})
}
471874
func (d *StateDir) Remove() error {
	if err := os.Remove(d.path); err != nil && !os.IsNotExist(err) {
		return err
	}
	// If atomic delete succeeded, update own state.
	d.state.Members = nil
	return nil
}
162935
func (c *changer) Remove() error {
	if c.err != nil {
		return c.err
	}
	return c.node.remove()
}
138386
func (d *Deployer) remove(unit *apideployer.Unit) error {
	unitName := unit.Name()
	if d.deployed.Contains(unitName) {
		panic("must not remove a deployed unit")
	} else if unit.Life() == params.Alive {
		panic("must not remove an Alive unit")
	}
	logger.Infof("removing unit %q", unitName)
	return unit.Remove()
}
1136540
func (b *FooJSONBuilder) Remove(info *FooPropertyInfo) *FooJSONBuilder {
	delete(b._properties, info.fieldName)
	return b
}
569382
func (lru *TTLRUCache) Remove(key interface{}) {
	lru.lock.Lock()
	defer lru.lock.Unlock()

	if element, ok := lru.mapping[key]; ok {
		lru.order.Remove(&element.orderelement)
		lru.timeorder.Remove(&element.timeelement)
		delete(lru.mapping, element.key)
		lru.triplePool.Put(element)
	}
}
348094
func (s *Service) Remove() error {
	err := s.remove()
	if errors.IsNotFound(err) {
		logger.Debugf("service %q not installed", s.Name())
		return nil
	} else if err != nil {
		logger.Errorf("failed to remove service %q: %v", s.Name(), err)
		return err
	}
	logger.Debugf("service %q successfully removed", s.Name())
	return nil
}
447506
func (image *Image) Remove() error {
	var c_name *C.char = C.CString(image.name)
	defer C.free(unsafe.Pointer(c_name))
	return GetError(C.rbd_remove(C.rados_ioctx_t(image.ioctx.Pointer()), c_name))
}
495525
func (m *NullClusterRemove) Remove(arg0 []api.Node, arg1 bool) error {
	return ErrNotImplemented
}
631173
func (p *partition) remove(key []byte) {
	p.mu.Lock()
	delete(p.store, string(key))
	p.mu.Unlock()
}
523028
func (c *Cache) Remove(key string) bool {
	c.Lock()
	defer c.Unlock()
	elem, ok := c.m[key]
	if !ok {
		return false
	}
	c.removeElement(elem)
	return true
}
1292
func (c *ContainerServer) Remove(ctx context.Context, container string, force bool) (string, error) {
	ctr, err := c.LookupContainer(container)
	if err != nil {
		return "", err
	}
	ctrID := ctr.ID()

	cStatus := ctr.State()
	switch cStatus.Status {
	case oci.ContainerStatePaused:
		return "", errors.Errorf("cannot remove paused container %s", ctrID)
	case oci.ContainerStateCreated, oci.ContainerStateRunning:
		if force {
			_, err = c.ContainerStop(ctx, container, 10)
			if err != nil {
				return "", errors.Wrapf(err, "unable to stop container %s", ctrID)
			}
		} else {
			return "", errors.Errorf("cannot remove running container %s", ctrID)
		}
	}

	if err := c.runtime.DeleteContainer(ctr); err != nil {
		return "", errors.Wrapf(err, "failed to delete container %s", ctrID)
	}
	if err := os.Remove(filepath.Join(c.Config().RuntimeConfig.ContainerExitsDir, ctrID)); err != nil && !os.IsNotExist(err) {
		return "", errors.Wrapf(err, "failed to remove container exit file %s", ctrID)
	}
	c.RemoveContainer(ctr)

	if err := c.storageRuntimeServer.DeleteContainer(ctrID); err != nil {
		return "", errors.Wrapf(err, "failed to delete storage for container %s", ctrID)
	}

	c.ReleaseContainerName(ctr.Name())

	if err := c.ctrIDIndex.Delete(ctrID); err != nil {
		return "", err
	}
	return ctrID, nil
}
16509
func (b *HogeJSONBuilder) Remove(info *HogePropertyInfo) *HogeJSONBuilder {
	delete(b._properties, info.fieldName)
	return b
}
1179194
func (s *Store) Remove(i interface{}) error {
	location := s.Path(i)
	return os.Remove(location)
}
952369
func Remove(t *Pot, v Val, pof Pof) (*Pot, int, bool) {
	return remove(t, v, pof)
}