lib/actions.js
function (plugin, callback){
    var cozyLight = require('./cozy-light');
    var config = configHelpers.getConfig();
    logger.info('Removing ' + plugin + '...');

    if (config.plugins[plugin] === undefined) {
      logger.error(plugin + ' is not installed.');
      nodeHelpers.invoke(callback, true);

    } else {
      var module = config.plugins[plugin].name;
      npmHelpers.uninstall(module, function removePluginFromConfig (err) {

        if (err) {
          logger.raw(err);
          logger.error('npm did not uninstall ' + plugin + ' correctly.');
          nodeHelpers.invoke(callback, err);

        } else {
          logger.info(plugin + ' successfully uninstalled.');
          pluginHelpers.stop(plugin, function(){
            pluginHelpers.unloadPlugin(plugin);
            configHelpers.watcher.one(callback);
            configHelpers.removePlugin(plugin);
          });
        }
      });
    }
  }
function (plugin, callback){
    var cozyLight = require('./cozy-light');
    var config = configHelpers.getConfig();
    logger.info('Removing ' + plugin + '...');

    if (config.plugins[plugin] === undefined) {
      logger.error(plugin + ' is not installed.');
      nodeHelpers.invoke(callback, true);

    } else {
      var module = config.plugins[plugin].name;
      npmHelpers.uninstall(module, function removePluginFromConfig (err) {

        if (err) {
          logger.raw(err);
          logger.error('npm did not uninstall ' + plugin + ' correctly.');
          nodeHelpers.invoke(callback, err);

        } else {
          logger.info(plugin + ' successfully uninstalled.');
          pluginHelpers.stop(plugin, function(){
            pluginHelpers.unloadPlugin(plugin);
            configHelpers.watcher.one(callback);
            configHelpers.removePlugin(plugin);
          });
        }
      });
    }
  }
Remove plugin from config and its source from node module folder.

@param {String} plugin Plugin to remove.
@param {Function} callback Termination.