Remove an existing project and its container.
518205
def rm(name):
    
    path = get_existing_project_path(name)

    click.confirm(
        'Are you sure you want to delete project %s?' % name, abort=True)

    container_name = get_container_name(name)
    client = docker.Client()
    try:
        client.inspect_container(container_name)
    except docker.errors.NotFound:
        pass
    else:
        print("Removing container %s..." % container_name)
        client.remove_container(container_name, v=True, force=True)

    print("Removing %s..." % path)
    shutil.rmtree(path)
143918
def remove(addon, dev):
    
    application = get_current_application()
    application.remove(addon, dev=dev)
1361288
public void destroy() {

        try {
            if (m_projectDriver != null) {
                try {
                    m_projectDriver.destroy();
                } catch (Throwable t) {
                    LOG.error(Messages.get().getBundle().key(Messages.ERR_CLOSE_PROJECT_DRIVER_0), t);
                }
                m_projectDriver = null;
            }
            if (m_userDriver != null) {
                try {
                    m_userDriver.destroy();
                } catch (Throwable t) {
                    LOG.error(Messages.get().getBundle().key(Messages.ERR_CLOSE_USER_DRIVER_0), t);
                }
                m_userDriver = null;
            }
            if (m_vfsDriver != null) {
                try {
                    m_vfsDriver.destroy();
                } catch (Throwable t) {
                    LOG.error(Messages.get().getBundle().key(Messages.ERR_CLOSE_VFS_DRIVER_0), t);
                }
                m_vfsDriver = null;
            }
            if (m_historyDriver != null) {
                try {
                    m_historyDriver.destroy();
                } catch (Throwable t) {
                    LOG.error(Messages.get().getBundle().key(Messages.ERR_CLOSE_HISTORY_DRIVER_0), t);
                }
                m_historyDriver = null;
            }

            if (m_pools != null) {
                for (CmsDbPoolV11 pool : m_pools.values()) {
                    try {
                        pool.close();
                        if (CmsLog.INIT.isDebugEnabled()) {
                            CmsLog.INIT.debug(Messages.get().getBundle().key(Messages.INIT_CLOSE_CONN_POOL_1, pool));
                        }

                    } catch (Throwable t) {
                        LOG.error(Messages.get().getBundle().key(Messages.LOG_CLOSE_CONN_POOL_ERROR_1, pool), t);
                    }
                }
                m_pools.clear();
            }

            m_monitor.clearCache();

            m_lockManager = null;
            m_htmlLinkValidator = null;
        } catch (Throwable t) {
            // ignore
        }
        if (CmsLog.INIT.isInfoEnabled()) {
            CmsLog.INIT.info(
                Messages.get().getBundle().key(Messages.INIT_DRIVER_MANAGER_DESTROY_1, getClass().getName()));
        }
    }
1190871
public function containersDestroy() {
    $this->validateConfig();
    $this->title('Destroying containers');
    $this->taskDockerComposeDown()
      ->file($this->dockerComposeFile)
      ->projectName($this->config->get('name'))
      ->removeOrphans()
      ->rmi('all')
      ->run();
  }
601351
def clean():
    """"""
    shutil.rmtree('{PROJECT_NAME}.egg-info'.format(PROJECT_NAME=PROJECT_NAME), ignore_errors=True)
    shutil.rmtree('build', ignore_errors=True)
    shutil.rmtree('dist', ignore_errors=True)
    shutil.rmtree('htmlcov', ignore_errors=True)
    shutil.rmtree('__pycache__', ignore_errors=True)
326937
@Delete("/projects/{projectName}")
    @RequiresRole(roles = ProjectRole.OWNER)
    public CompletableFuture<Void> removeProject(Project project, Author author) {
        // Metadata must be updated first because it cannot be updated if the project is removed.
        return mds.removeProject(author, project.name())
                  .thenCompose(unused -> execute(Command.removeProject(author, project.name())))
                  .handle(HttpApiUtil::throwUnsafelyIfNonNull);
    }
54115
final protected function stepRemoveProject()
    {
        Output::clear();
        Output::displayAsGreen("Welcome on App Manager.\n".
            "I'm assist you to remove your app. Many question will ask you.", "none");
        Output::outputAsReadLine($this->stage[0], "none");

        $this->params['appname'] = ucfirst($this->listener());

        $elem = false;
        while ($elem == false) {
            if ($this->checkAppName($this->params['appname']) != 1) {
                Output::displayAsRed("Your app name is invalid. Please Retry.", "none", false);
            } elseif ($this->checkAppExist($this->params['appname']) == false &&
                $this->checkAppRegister($this->params['appname']) == false) {
                $elem = false;
                Output::displayAsRed(
                    "This app not exist, Please enter an existed app name",
                    "none",
                    false
                );
            } else {
                $elem = true;
                continue;
            }

            Output::outputAsReadLine($this->stage[0], "none");
            $this->params['appname'] = ucfirst($this->listener());
        }

        if ($this->checkAppExist($this->params['appname']) == true &&
            $this->checkAppRegister($this->params['appname']) == false) {
            Output::displayAsGreen("Ok ! Your app is ".$this->params['appname'].
                ". It exist on apps directory but it's not declared in app declarator", "none", false);
        } elseif ($this->checkAppExist($this->params['appname']) == false &&
            $this->checkAppRegister($this->params['appname']) == true) {
            Output::displayAsGreen("Ok ! Your app is ".$this->params['appname'].
                ". It's declared in app declarator but not exist in apps directory", "none", false);
        } else {
            Output::displayAsGreen("Ok ! Your app is ".$this->params['appname'].
                ". It's declared in app declarator and exist in apps directory", "none", false);
        }
        Output::outputAsReadLine($this->stage[4], "none");
        $conf = ((!empty($this->listener()))?  $this->listener() : "yes");
        while ($this->checkBooleanResponse($conf) != 1) {
            Output::displayAsRed("Invalid response. Please Retry (yes/no)", "none", false);
            Output::outputAsReadLine($this->stage[4], "none");
            $conf = ((!empty($this->listener()))?  $this->listener() : "yes");
        }
        if ($conf == "no") {
            Output::outputAsError($this->stage[6]);
        }
        $this->removeAppProcess();
    }
1102272
def remove_existing_container(engine_obj, service_name, remove_volumes=False):
    
    conductor_container_id = engine_obj.get_container_id_for_service(service_name)
    if engine_obj.service_is_running(service_name):
        engine_obj.stop_container(conductor_container_id, forcefully=True)
    if conductor_container_id:
        engine_obj.delete_container(conductor_container_id, remove_volumes=remove_volumes)
318412
def delete_project(self, project):
        
        pid = project.pid

        # project deleted

        ds_project = self.get_project(pid)
        if ds_project is not None:
            self._delete_project(pid)

        return
607652
def delete(
        self
    ):
        

        projectTitle = self.title
        theseProjects = self.parent.projects[:]
        for p in theseProjects:
            if p.title == projectTitle:
                theseProjects.remove(p)
                break
        self.parent.projects = theseProjects

        doc = self
        while doc:
            if not doc.parent:
                break
            else:
                doc = doc.parent

        doc.content = doc.to_string(indentLevel=0, title=False)

        return None
878167
def delete(self, project_status, params={}, **options): 
        
        path = "/project_statuses/%s" % (project_status)
        return self.client.delete(path, params, **options)
253783
def clear(self):
        
        for variable in self._project.variables.list(all=True):
            variable.delete()
329285
public function uninstall_cleanup() {
        global $CFG;
        require_once($CFG->dirroot.'/repository/lib.php');

        $repo = \repository::get_type_by_typename($this->name);
        if ($repo) {
            $repo->delete(true);
        }

        parent::uninstall_cleanup();
    }
420481
def cleanup(parent = Object, current = @top)
      return unless all_project_objects_lookup[current]
      current.constants.each {|const| cleanup current, current.const_get(const)}
      parent.send(:remove_const, current.to_s.split('::').last.to_sym)
    end
52776
def remove_path_from_sys_path(self):
        """"""
        for path in self.path + self.project_path:
            while path in sys.path:
                sys.path.remove(path)
236672
protected void cleanupProjectIfEmpty(CmsProject project) throws CmsException {

        if ((project.getType().getMode() == CmsProject.PROJECT_TYPE_WORKFLOW.getMode()) && isProjectEmpty(project)) {
            LOG.info("Removing project " + project.getName() + " because it is an empty workflow project.");
            m_adminCms.deleteProject(project.getUuid());
        }
    }
204238
def remove_container(self, container, **kwargs):
        
        self.push_log("Removing container '{0}'.".format(container))
        set_raise_on_error(kwargs)
        super(DockerFabricClient, self).remove_container(container, **kwargs)