Uninstalls a plugin.
344159
public function uninstall()
    {
        $_POST['selected'] = [];

        foreach ((array) $this->plugin as $plugin) {
            $_POST['selected'][] = $plugin->name;
        }

        $_POST['edit_method'] = 'delete';
        ob_start();
        plugin_multi_edit();
        ob_end_clean();
    }
1004313
private void unloadIncompatiblePlugins() {
    // loop as long as the previous loop ignored some plugins. That allows to support dependencies
    // on many levels, for example D extends C, which extends B, which requires A. If A is not installed,
    // then B, C and D must be ignored. That's not possible to achieve this algorithm with a single
    // iteration over plugins.
    Set<String> removedKeys = new HashSet<>();
    do {
      removedKeys.clear();
      for (PluginInfo plugin : pluginInfosByKeys.values()) {
        if (!isCompatible(plugin, runtime, pluginInfosByKeys)) {
          removedKeys.add(plugin.getKey());
        }
      }
      for (String removedKey : removedKeys) {
        pluginInfosByKeys.remove(removedKey);
      }
    } while (!removedKeys.isEmpty());
  }
664115
public function delete($pluginName)
    {
        $plugin = plugin($pluginName); // throws if not exists
        $task = (bool)WebShellDispatcher::run("Installer.plugins uninstall -p {$plugin->name}");

        if ($task) {
            $this->Flash->success(__d('system', 'Plugin was successfully removed!'));
        } else {
            $this->Flash->set(__d('system', 'Plugins could not be removed'), [
                'element' => 'System.installer_errors',
                'params' => ['errors' => WebShellDispatcher::output()],
            ]);
        }

        $this->title(__d('system', 'Uninstall Plugin'));
        header('Location:' . $this->referer());
        exit();
    }
1283662
function uninstall(deps, options, exec) {
	options = options || {};
	deps = _.castArray(deps);
	const dev = options.dev !== false;
	const run = options.yarn || isUsingYarn() ? runYarn : runNpm;

	const installed = getOwnDependencies({ dev });

	const newDeps = deps.filter(dep => installed[dep]);

	if (newDeps.length === 0) {
		return;
	}

	log.info(`Uninstalling ${listify(newDeps)}...`);
	run(newDeps, { remove: true, dev }, exec);
}
1053263
public function uninstall()
    {
        // "Disable" (delete) events, regardless the confirmation answer.
        $this->uninstallEvents();
        $this->registry->response->redirect($this->registry->getLink($this->getLocation() . '/confirmUninstall'));
    }
1009671
def discard_plugin_preset(self):
        
        if self.has_plugin_preset:
            for name, plugin in list(self._active_plugins.items()):
                if id(plugin) in self._provided_by_preset:
                    self.release_plugin(name)
            self._active_preset.deactivate(self)
        self._active_preset = None
1039796
def unload_plug_in(self, name):
        
        if not isinstance(name, basestring):
            raise TypeError("name can only be an instance of type basestring")
        self._call("unloadPlugIn",
                     in_p=[name])
1312207
def close(self):
        '''  '''
        for plugin in self.plugins:
            if hasattr(plugin, 'close'): plugin.close()
        self.stopped = True
803067
public static function uninstall() {
		$cptp = CPTP::get_instance();

		foreach ( $cptp->modules as $module ) {
			$module->uninstall_hook();
		}
	}
360819
private static function uninstall( $plugin_base_name ) {
		$app = self::find_plugin( $plugin_base_name );
		if ( ! isset( $app ) ) {
			return;
		}

		$app->_is_uninstall = true;
		$app->plugins_loaded();
		$app->main_init();
		$app->uninstall->uninstall();
	}
452588
protected function _uninstall()
    {
        $allThemes = plugin()
            ->filter(function ($plugin) {
                return $plugin->isTheme;
            })
            ->toArray();
        $index = 1;
        $this->out();
        foreach ($allThemes as $plugin) {
            $allThemes[$index] = $plugin;
            $this->out(__d('installer', '[{0, number}] {1}', [$index, $plugin->humanName]));
            $index++;
        }
        $this->out();

        $message = __d('installer', "Which theme would you like to uninstall?\n[Q]uit");
        while (true) {
            $in = trim($this->in($message));
            if (strtoupper($in) === 'Q') {
                $this->err(__d('installer', 'Operation aborted'));
                break;
            } elseif (intval($in) < 1 || !isset($allThemes[intval($in)])) {
                $this->err(__d('installer', 'Invalid option'));
            } else {
                $plugin = plugin($allThemes[$in]->name());
                $this->hr();
                $this->out(__d('installer', '<info>The following theme will be uninstalled</info>'));
                $this->hr();
                $this->out(__d('installer', 'Name:        {0}', $plugin->name));
                $this->out(__d('installer', 'Description: {0}', $plugin->composer['description']));
                $this->out(__d('installer', 'Path:        {0}', $plugin->path));
                $this->hr();
                $this->out();

                $confirm = $this->in(__d('installer', 'Please type in "{0}" to uninstall', $allThemes[$in]->name));
                if ($confirm === $allThemes[$in]->name) {
                    $task = $this->dispatchShell("Installer.plugins uninstall -p {$allThemes[$in]->name}");

                    if ($task === 0) {
                        $this->out(__d('installer', 'Plugin uninstalled!'));
                        Plugin::dropCache();
                    } else {
                        $this->err(__d('installer', 'Plugin could not be uninstalled.'), 2);
                        $this->out();
                    }
                } else {
                    $this->err(__d('installer', 'Confirmation failure, operation aborted!'));
                }
                break;
            }
        }

        $this->out();
    }
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)
557946
def on_uninstall(self):
        """"""
        self._on_close = True
        self.enabled = False
        self._editor = None
663552
public function unloadPlugins()
    {
        $this->resetTransientCache();

        $pluginsLoaded = $this->getLoadedPlugins();
        foreach ($pluginsLoaded as $plugin) {
            $this->unloadPlugin($plugin);
        }
    }
1278243
def release_plugin(self, name):
        
        plugin = self._active_plugins[name]
        if id(plugin) in self._provided_by_preset:
            self._provided_by_preset.remove(id(plugin))

        del self._active_plugins[name]
        delattr(self, name)
112112
def close(self):
        '''
        
        '''
        for plugin_key in self.plugins_dict:
            obj = self.plugins_dict[plugin_key]
            instance = obj['instance']
            instance.close()
1221825
public static function unload($plugin = null)
    {
        deprecationWarning('Plugin::unload() will be removed in 4.0. Use PluginCollection::remove() or clear()');
        if ($plugin === null) {
            static::getCollection()->clear();
        } else {
            static::getCollection()->remove($plugin);
        }
    }