Remove the Micronaut console.
496345
public static synchronized void removeInstance() {
        if (instance != null) {
            instance.removeShutdownHook();
            instance.restoreOriginalSystemOutAndErr();
            if (instance.getReader() != null) {
                instance.getReader().shutdown();
            }
            instance = null;
        }
    }
911073
def remove(self, addon, dev=False):
        """"""
        dependencies = self.get_dependency_manager(dev=dev)
        other_dependencies = self.get_dependency_manager(dev=not dev)
        self.stdout.write(style.format_command('Removing', addon))
        removed = dependencies.remove(addon, warn=False)
        if not removed:
            removed = other_dependencies.remove(addon, warn=False)

        if removed:
            self.build()
        else:
            exception = '%s is not installed.' % Dependency(addon).to_stdout()
            self.stdout.write(style.red(exception))
565560
def remove(self, cb):
        """"""
        if cb in self.callbacks:
            self.callbacks.remove(cb)
            new_monitor = 0
            for c in self.callbacks:
                new_monitor |= c.bit
            if new_monitor != self.monitor:
                self.monitor = new_monitor
                yield from self.pi._pigpio_aio_command(
                    _PI_CMD_NB, self.handle, self.monitor)
698898
public void destroy() {
        if (mEngine != null) {
            mLog.info("Destroying Engine");
            mEngine.destroy();
        }
        mLog.info("Destroying TeaServlet");
        super.destroy();
    }
983446
def release(self):
        """"""
        self.clear()

        if hasattr(self, "functions"):
            del self.functions

        if hasattr(self, "lib") and self.lib is not None:
            self.lib._jit_destroy_state(self.state)
            self.lib = None
312547
def remove(self):
        ""
        if not self.removed:
            self.hook.remove()
            self.removed=True
1184525
def close(self):
        """"""
        if self._access is not None:
            _logger.debug("Cleaning up")
            pci_cleanup(self._access)
        self._access = None
677838
def delete(self):
        """"""
        self._client.remove_object(self._instance, self._bucket, self.name)
84826
def remove(self):
        
        ''' 
                
        '''
        
        self.table.drop(self.engine)
        
        exit_msg = '%s table has been removed from %s database.' % (self.table_name, self.database_name)
        self.printer(exit_msg)
        
        return exit_msg
1373108
public function down()
    {
        /** @var \LCI\MODX\Console\Console $console */
        $console = new Console();
        $console->cancelRegistrationPackageCommands('LCI\Blend\Console\ActivePackageCommands');

        /** @var \LCI\Blend\Blendable\SystemSetting $systemSetting */
        $systemSetting = $this->blender->getBlendableLoader()->getBlendableSystemSetting('blend.version');
        $systemSetting
            ->setSeedsDir($this->getSeedsDir())
            ->revertBlend();

        $this->modx->cacheManager->refresh();

        $previous_version = $this->modx->getOption('blend.version');
        if (!$previous_version || version_compare($this->getVersion(), $previous_version, '>') ) {

            /** @var \xPDOManager $manager */
            $manager = $this->modx->getManager();

            // the class table object name
            if ($manager->removeField('BlendMigrations', 'project', ['after' => 'status'])) {
                $this->blender->outSuccess('The project column was removed from the BlendMigrations class ('.
                    $this->modx->getTableName('BlendMigrations').') successfully');

            } else {
                $this->blender->out('The project column was not removed from the BlendMigrations class ('.
                    $this->modx->getTableName('BlendMigrations').') successfully', true);
            }
        }
    }
883075
def stop(self):
        """"""
        LOGGER.info('Shutting down controller')
        self.set_state(self.STATE_STOP_REQUESTED)

        # Clear out the timer
        signal.setitimer(signal.ITIMER_PROF, 0, 0)

        self._mcp.stop_processes()

        if self._mcp.is_running:
            LOGGER.info('Waiting up to 3 seconds for MCP to shut things down')
            signal.setitimer(signal.ITIMER_REAL, 3, 0)
            signal.pause()
            LOGGER.info('Post pause')

        # Force MCP to stop
        if self._mcp.is_running:
            LOGGER.warning('MCP is taking too long, requesting process kills')
            self._mcp.stop_processes()
            del self._mcp
        else:
            LOGGER.info('MCP exited cleanly')

        # Change our state
        self._stopped()
        LOGGER.info('Shutdown complete')
855433
def remove_outs(self, ignore_remove=False, force=False):
        """"""
        for out in self.outs:
            if out.persist and not force:
                out.unprotect()
            else:
                logger.debug(
                    "Removing output '{out}' of '{stage}'.".format(
                        out=out, stage=self.relpath
                    )
                )
                out.remove(ignore_remove=ignore_remove)
381390
def remove(self):
        
        try:
            self.phase = PHASE.REMOVE
            self.logger.info("Removing environment %s..." % self.namespace)
            self.instantiate_features()
            self._specialize()
            for feature in self.features.run_order:
                try:
                    self.run_action(feature, 'sync')
                except FormulaException:
                    # continue trying to remove any remaining features.
                    pass
            self.clear_all()
            self.directory.remove()
            self.injections.commit()
            if self.error_occured:
                self.logger.error(warning_template)
                self.logger.error(REMOVE_WARNING)
        except Exception:
            self.logger.debug("", exc_info=sys.exc_info())
            et, ei, tb = sys.exc_info()
            reraise(et, ei, tb)
822160
def delete_gauge(self, slug):
        """"""
        key = self._gauge_key(slug)
        self.r.delete(key)  # Remove the Gauge
        self.r.srem(self._gauge_slugs_key, slug)
372891
void unregisterUse() {
		final int value = this.uses.decrementAndGet();
		if (value == 0) {
			uninstall(UninstallationStage.PRE_DESTROY_EVENT);
			uninstall(UninstallationStage.POST_DESTROY_EVENT);
		}
	}
852990
def uninstall(args, env, console, ciprcfg):
    
    for name in args:
        package_dir = path.join(env.package_dir, name)
        if path.exists(package_dir):
            console.quiet('Removing %s...' % name)
            if path.islink(package_dir):
                os.remove(package_dir)
            else:
                shutil.rmtree(package_dir)

        ciprcfg.remove_package(name)
882262
def stop(self):
        """"""
        self.state = False
        with display_manager(self.display) as d:
            d.record_disable_context(self.ctx)
            d.ungrab_keyboard(X.CurrentTime)
        with display_manager(self.display2):
            d.record_disable_context(self.ctx)
            d.ungrab_keyboard(X.CurrentTime)