public function uninstallPlugin($pluginSlug, Errors $errors, $purge = false)
    {

        $log = "";

        $plugin = $this->PluginService->getBySlug($pluginSlug);

        if (empty($plugin) || !$plugin->isInstalled()) {
            $log .= "Plugin not installed.";
            return array($log,'fail');
        }

        $pluginPath = $plugin->getPath();

        $log .= "Uninstalling plugin: {$pluginSlug}\n";

        $plugin->Enabled = false;
        $plugin->Installed = false;

        $this->PluginService->edit($plugin);

        $log .= "Plugin uninstalled...\n";
        $log .= "ID: {$plugin->PluginID}\n";
        $log .= "Slug: {$plugin->Slug}\n";
        $log .= "Title: {$plugin->Title}\n";
        $log .= "Description: {$plugin->Description}\n";
        $log .= "Md5: {$plugin->Md5}\n";
        $log .= "\n";


        if ($purge) {
            $this->uninstallAspects($plugin);
            $this->uninstallCMSNavItems($plugin);
        }

        //SUCCESS!

        $this->ApplicationContext->clearContextFiles();

        $log .= "\nSUCCESS!\n\n";
        return array($log, strpos($log, 'WARNING')=== FALSE?'success':'warn');

    }