Removes the autoloader and config from the app/config/bundles folder
162890
protected function uninstall()
    {
        $uninstallScripts = array();
        if (!empty($this->installedBundles)) {
            foreach ($this->installedBundles as $autoloader) {
                $bundleName = $autoloader->getBundleName();
                $uninstallScripts[$bundleName] = $autoloader->getActionManagerClass();
                $this->filesystem->remove($this->autoloadersPath . '/' . $bundleName . '.json');
                $this->filesystem->remove($this->configPath);
                $this->filesystem->remove($this->routingPath);
            }
        }

        $this->requireCachedClasses();
        $uninstallerScript = $this->scriptFactory->createScript('PreBootUninstaller');
        $uninstallerScript->executeActions($uninstallScripts);
    }
1129993
def _remove_setting(section, name, configfile, save=False):
    '''
    '''
    removed = False
    config = _load_config(configfile)
    if section in config:
        if name.lower() in config[section]:
            removed = config.remove_option(section, name)

    # Does the user want to save the file?
    if removed and save:
        write_config(configfile, config)

    return removed
86751
def clear_and_configure(config=None, bind_in_runtime=True):
    """"""
    with _INJECTOR_LOCK:
        clear()
        return configure(config, bind_in_runtime=bind_in_runtime)
53318
def cleanup(config_dir):
    """"""
    stdout_path = os.path.join(config_dir, 'pueue.stdout')
    stderr_path = os.path.join(config_dir, 'pueue.stderr')
    if os._exists(stdout_path):
        os.remove(stdout_path)
    if os._exists(stderr_path):
        os.remove(stderr_path)

    socketPath = os.path.join(config_dir, 'pueue.sock')
    if os.path.exists(socketPath):
        os.remove(socketPath)
1079468
function cleanUpOldExecutable(next) {
        fs.unlink(nodeCompiler.releasePath, function(err) {
          if (err) {
            if (err.code === 'ENOENT') {
              next();
            } else {
              throw err;
            }
          } else {
            next();
          }
        });
      }
735541
function cleanUpPreviousConfig(location, app, callback) {
  var confRegex = new RegExp(app + ".*\\.conf");
  var removeConfig = function(fileName, rmCallback) {
    if (confRegex.test(fileName)) {
      return fs.unlink(location + '/' + fileName, rmCallback);
    } else {
      return rmCallback(null);
    }
  };

  fs.readdir(location, function(err, files) {
    async.forEach(files, removeConfig, callback);
  });
}
703265
def uninstall_bundle(self, bundle):
        # type: (Bundle) -> None
        
        if bundle is None:
            # Do nothing
            return

        with self.__bundles_lock:
            # Stop the bundle first
            bundle.stop()

            bundle_id = bundle.get_bundle_id()
            if bundle_id not in self.__bundles:
                raise BundleException("Invalid bundle {0}".format(bundle))

            # Notify listeners
            self._dispatcher.fire_bundle_event(
                BundleEvent(BundleEvent.UNINSTALLED, bundle)
            )

            # Remove it from the dictionary
            del self.__bundles[bundle_id]

            # Remove it from the system => avoid unintended behaviors and
            # forces a complete module reload if it is re-installed
            name = bundle.get_symbolic_name()
            try:
                del sys.modules[name]
            except KeyError:
                # Ignore
                pass

            try:
                # Clear reference in parent
                parent, basename = name.rsplit(".", 1)
                if parent:
                    delattr(sys.modules[parent], basename)
            except (KeyError, AttributeError, ValueError):
                # Ignore errors
                pass
908626
protected function resetGlobalSettings()
    {
        if ($this->app instanceof \yii\web\Application) {
            $this->app->assetManager->bundles = [];
        }
    }
443861
protected function cleanup()
    {
        $this->filesystem->remove($this->tmpFolder);
        $this->root = null;
        $this->urlsets = array();
    }
278108
function remove(conf) {
  var file = conf.get(ConfigKey.PIDFILE);
  // can be the empty string
  if(file) {
    log.notice('removing pid file %s', file);
    try {
      fs.unlinkSync(file);
    }catch(e) {
      log.warning('failed to remove pid file (%s): %s', file, e.message);
    }
  }
}
127573
protected function removeModule(): void
    {
        foreach (self::DIRECTORIES as $directory) {
            $this->remove($directory);
        }

        $this->installer->getIo()->write(
            sprintf(
                '  - Removed <comment>%s</comment> module from application',
                basename($this->packagePath)
            ),
            true
        );
    }
1025789
private void removePathMappingFromPathMap(JoinableResourceBundle bundle) {
		for (List<PathMapping> pathMappings : pathToResourceBundle.values()) {
			for (Iterator<PathMapping> iterator = pathMappings.iterator(); iterator.hasNext();) {
				PathMapping pathMapping = (PathMapping) iterator.next();
				if (pathMapping.getBundle().getName().equals(bundle.getName())) {
					iterator.remove();
				}
			}
		}
	}
458298
def remove(self, bundle):
        
        from six import string_types

        if isinstance(bundle, string_types):
            bundle = self.bundle(bundle)

        self.database.remove_dataset(bundle.dataset)
23455
def clear_all(self):
        
        self.injections.clear_all()
        for config_file in CONFIG_FILES:
            self.injections.clear(os.path.join("~", config_file))
1291753
def _purge_config_file(self, key):
        
        state = self.__load_state()
        del state['remove_configs'][key]
        self.__dump_state(state)
1091309
private function ClearInstalledBundles()
    {
        //Clear bundles without code folder
        $bundles = PathUtil::Bundles();
        $sql = new Sql\Builder($this->connection);
        $inList = $sql->InListFromValues($bundles);
        $tbl = InstalledBundle::Schema()->Table();
        
        $where = $sql->NotIn($tbl->Field('Bundle'), $inList);
        InstalledBundle::Schema()->Delete($where);
        //Clear failed bundles
        $failedList = $sql->InListFromValues(array_keys($this->failedBundles));
        if ($failedList)
        {
            InstalledBundle::Schema()->Delete($sql->In($tbl->Field('Bundle'), $failedList));
        }
    }
151913
def cleanup(config=None, path=None):
    """"""
    if config is None:
        config = parse()
    if path is None:
        path = os.getcwd()
    root = config.get('root', 'path')
    root = os.path.join(path, root)
    if sys.path[0] == root:
        sys.path.remove(root)