Removes the index for a help module.

@param helpModule Help module whose index is to be removed.
323964
@Override
    public void unindexHelpModule(HelpModule helpModule) {
        try {
            log.info("Removing index for help module " + helpModule.getLocalizedId());
            Term term = new Term("module", helpModule.getLocalizedId());
            writer.deleteDocuments(term);
            writer.commit();
            indexTracker.remove(helpModule);
        } catch (IOException e) {
            MiscUtil.toUnchecked(e);
        }
    }
988731
protected static function removeNodeModules()
    {
        tap(new Filesystem, function ($files) {
            $files->deleteDirectory(base_path('node_modules'));

            $files->delete(base_path('yarn.lock'));
        });
    }
772878
public synchronized boolean deleteModule(String fileName) throws CmsException {

        String moduleName = null;
        boolean ok = true;
        try {
            CmsModule module = getModuleForFileName(fileName);
            if (module == null) {
                LOG.error("Deletion request for invalid module file name: " + fileName);
                ok = false;
                return false;
            }
            I_CmsReport report = createReport();
            moduleName = module.getName();
            OpenCms.getModuleManager().deleteModule(m_adminCms, module.getName(), false, report);
            ok = !(report.hasWarning() || report.hasError());
            return true;
        } catch (Exception e) {
            ok = false;
            if (e instanceof CmsException) {
                throw (CmsException)e;
            }
            if (e instanceof RuntimeException) {
                throw (RuntimeException)e;
            }
            return true;
        } finally {
            m_moduleLog.log(moduleName, Action.deleteModule, ok);
        }

    }
1002812
public static function remove_module( $module ) {
		$key = array_search( $module, self::$modules, true );
		if ( false !== $key ) {
			unset( self::$modules[ $key ] );
		}
	}
364484
public void stopModule(ExtendedModuleInfo moduleInfo) {
        
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.entry(tc, "stopModule()",((WebModuleInfo)moduleInfo).getName());
        }
       
        WebModuleInfo webModule = (WebModuleInfo) moduleInfo;
        try {
            DeployedModule dMod = this.deployedModuleMap.remove(webModule);
            if (null == dMod) {
                if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
                    Tr.exit(tc, "stopModule()","DeployedModule not known");
                }
                return;
            }
            
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, "stopModule: " + webModule.getName() + " " + webModule.getContextRoot());
            }

            removeContextRootRequirement(dMod);
            removeModule(dMod);
            
            this.vhostManager.purgeHost(dMod.getVirtualHostName());

            WebModuleMetaData wmmd = (WebModuleMetaData) ((ExtendedModuleInfo)webModule).getMetaData();
            
            deregisterMBeans((WebModuleMetaDataImpl) wmmd);
            
            WebAppConfiguration appConfig = (WebAppConfiguration) wmmd.getConfiguration();
            for (Iterator<IServletConfig> servletConfigs = appConfig.getServletInfos(); servletConfigs.hasNext();) {
                IServletConfig servletConfig = servletConfigs.next();
                metaDataService.fireComponentMetaDataDestroyed(servletConfig.getMetaData());
            }

            metaDataService.fireComponentMetaDataDestroyed(appConfig.getDefaultComponentMetaData());
            metaDataService.fireComponentMetaDataDestroyed(wmmd.getCollaboratorComponentMetaData());
        } catch (Throwable e) {
            FFDCWrapper.processException(e, getClass().getName(), "stopModule", new Object[] { webModule, this });
            if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
                Tr.event(tc, "stopModule: " + webModule.getName() + "; " + e);
            }
        }
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.exit(tc, "stopModule()");
        }

    }
470942
public function disableModules($enabledModules)
    {
        $coreModules = $this->getCoreModules();

        foreach ($enabledModules as $moduleToDisable => $value) {
            if (isset($coreModules[$moduleToDisable])) {
                continue;
            }
            $module = $this->module->get($moduleToDisable);
            $module->disable();
        }
    }
83726
public static synchronized void unregisterModule(PmiModule instance) {
        if (disabled)
            return;
        if (instance == null) // || instance.getPath().length<=1) return;
            return;

        // check if the path has null in it. if a module is unregistered twice
        // the path will have null
        String[] path = instance.getPath();
        if (path == null || path.length == 0)
            return;
        for (int k = 0; k < path.length; k++) {
            if (path[k] == null)
                return;
        }

        if (tc.isEntryEnabled())
            Tr.entry(tc, "unregisterModule: " + instance.getModuleID() + ", " + instance.getName());
        // unregister itself

        String[] parentPath = new String[path.length - 1];
        System.arraycopy(path, 0, parentPath, 0, parentPath.length);
        // locate parent
        ModuleItem parent = moduleRoot.find(parentPath, 0);
        if (parent != null) {
            // remove "instance" from parent
            parent.remove(parent.find(path[path.length - 1]));
            // do not remove the empty parent group in custom pmi
            // in custom PMI groups/instances are explicitly created and
            // should be remove explicitly

            // in pre-custom groups are create IMPLICITYLY when needed
            if (instance.isCustomModule())
                return;

            // check if parent is empty
            if (parent.children == null || parent.children.size() == 0) {
                if (parent.getInstance() != null) {
                    String[] mypath = parent.getInstance().getPath();
                    // TODO: ask Wenjian about this?
                    // exclude WEBAPP_MODULE because it is created explicitly and
                    // should be removed explictly by calling PmiFactory.removePmiModule
                    if (!(mypath.length == 2 && (mypath[0].equals(WEBSERVICES_MODULE)))) {
                        // recursive call?: unregisterModule (parent.getInstance());
                        parent.getInstance().unregister();
                    }
                }
            }
        }
        if (tc.isEntryEnabled())
            Tr.exit(tc, "unregisterModule");
    }
222332
public void removeWebApplication(DeployedModule deployedModule) {
        String contextRoot = deployedModule.getContextRoot();
        //begin 280649    SERVICE: clean up separation of core and shell    WASCC.web.webcontainer : reuse with other VirtualHost impls.
        removeWebApplication(deployedModule, contextRoot);
        //end 280649    SERVICE: clean up separation of core and shell    WASCC.web.webcontainer : reuse with other VirtualHost impls.

    }
879040
def remove_modifier(self, index, m_type=XenaModifierType.standard):
        

        if m_type == XenaModifierType.standard:
            current_modifiers = OrderedDict(self.modifiers)
            del current_modifiers[index]

            self.set_attributes(ps_modifiercount=0)
            self.del_objects_by_type('modifier')

        else:
            current_modifiers = OrderedDict(self.xmodifiers)
            del current_modifiers[index]

            self.set_attributes(ps_modifierextcount=0)
            self.del_objects_by_type('xmodifier')

        for modifier in current_modifiers.values():
            self.add_modifier(m_type,
                              mask=modifier.mask, action=modifier.action, repeat=modifier.repeat,
                              min_val=modifier.min_val, step=modifier.step, max_val=modifier.max_val)
93643
public void deleteModule(final String moduleId) {
        final DbModule module = getModule(moduleId);
        repositoryHandler.deleteModule(module.getId());

        for (final String gavc : DataUtils.getAllArtifacts(module)) {
            repositoryHandler.deleteArtifact(gavc);
        }
    }
1234923
public void removeModules(List<String> modules) throws Exception {
        long startTime = System.currentTimeMillis();
        Exception exception = null;
        if (!cfg.exists()) {
            init();
        }
        userDir = new File(System.getProperty("user.dir")).getAbsolutePath();
        System.setProperty("user.dir", options.getExecutionDirectory().getAbsolutePath());
        try {
            ConfigurationManager manager = new ConfigurationManager(cfg, false);

            ProjectConfigurationProvider cfgProvider = manager.getProjectConfigurationProvider();
            cfgProvider.removeModules(modules);
        } catch (Exception e) {
            exception = e;
        } finally {
            System.setProperty("user.dir", userDir);
            updateMsg(startTime, exception);
        }
    }
621547
function _cleanModulesOnElement(enabledElement) {
  const modules = store.modules;

  Object.keys(modules).forEach(function(key) {
    if (typeof modules[key].removeEnabledElementCallback === 'function') {
      modules[key].removeEnabledElementCallback(enabledElement);
    }
  });
}
360729
function deleteModule(logger, moduleName, location) {
    logger.info(`Deleting ${location} files…`);
    const modulePath = computeModulesPath(location, moduleName);

    if (fs.existsSync(modulePath)) {
        // remove module directory
        shell.rm('-rf', modulePath);

        const modulesPath = computeModulesPath(location);

        // get index file path
        const indexFullFileName = fs.readdirSync(modulesPath).find(name => name.search(/index/) >= 0);
        const indexPath = modulesPath + indexFullFileName;
        let indexContent;

        try {
            indexContent = fs.readFileSync(indexPath);
        } catch (e) {
            logger.error(chalk.red(`Failed to read ${indexPath} file`));
            process.exit();
        }

        // extract application modules
        const appModuleRegExp = /Module\(([^()]+)\)/g;
        const [, appModules] = appModuleRegExp.exec(indexContent) || ['', ''];
        const appModulesWithoutDeleted = appModules.split(',').filter(appModule => appModule.trim() !== moduleName);

        const contentWithoutDeletedModule = indexContent
            .toString()
            // remove module from modules list
            .replace(appModuleRegExp, `Module(${appModulesWithoutDeleted.toString().trim()})`)
            // remove module import
            .replace(RegExp(`import ${moduleName} from './${moduleName}';\n`, 'g'), '');

        fs.writeFileSync(indexPath, contentWithoutDeletedModule);
        runPrettier(indexPath);

        logger.info(chalk.green(`✔ Module for ${location} successfully deleted!`));
    } else {
        logger.info(chalk.red(`✘ Module ${location} location for ${modulePath} not found!`));
    }
}
232881
public void restartWebApplication(DeployedModule webModuleConfig) throws WebAppNotLoadedException {
        try {
            removeWebApplication(webModuleConfig);
        } catch (Exception e) {
            String groupName = webModuleConfig.getName();
            //Translated to SRVE0314E: Failed to remove web module {0}: {1}
            String message = nls.getFormattedMessage("failed.to.remove.webmodule", new Object[] { groupName, e }, "Failed to remove web module");
            logger.logp(Level.SEVERE, CLASS_NAME, "restartWebApplication", message);
            return;
        }

        addWebApplication(webModuleConfig);
    }
1080097
def unregisterAddonModule(cls, module):
        
        prop = '_{0}__addon_modules'.format(cls.__name__)
        mods = getattr(cls, prop, set())
        try:
            mods.remove(module)
        except KeyError:
            pass
1096832
public void clearRegisteredModules()
    {
        ServletContext servletContext = getServletContext();
        
        for ( Iterator ii = _registeredModules.keySet().iterator(); ii.hasNext(); )  
        {
            String modulePrefix = ( String ) ii.next();
            servletContext.removeAttribute( Globals.MODULE_KEY + modulePrefix );
            servletContext.removeAttribute( Globals.REQUEST_PROCESSOR_KEY + modulePrefix );
        }
        
        _registeredModules.clear();
    }
926718
protected static function _deactivateOldModule()
    {
        $sModule = self::OLD_MODULE_ID;

        /**
         * @var oxModule $oModule
         */
        $oModule = self::_getModule();

        if ($oModule->load($sModule) === false) {
            self::_getUtilsView()->addErrorToDisplay(new oxException('EXCEPTION_MODULE_NOT_LOADED'));
            return false;
        }

        try {
            $oModuleCache = self::_getModuleCache($oModule);
            $oModuleInstaller = self::_getModuleInstaller($oModuleCache);
            return $oModuleInstaller->deactivate($oModule);
        } catch (oxException $oEx) {
            self::_getUtilsView()->addErrorToDisplay($oEx);

            if (method_exists($oEx, 'debugOut')) {
                $oEx->debugOut();
            }
        }

        return false;
    }