{"record":{"id":"d97c16d40bfc56ff","repo":"octobercms/october","slug":"plugin-name-not-found","errorCode":null,"errorMessage":"Plugin [$name] not found","messagePattern":"Plugin \\[\\$name\\] not found","errorType":"exception","errorClass":"ApplicationException","httpStatus":null,"severity":"error","filePath":"modules/system/classes/updatemanager/ManagesPlugins.php","lineNumber":56,"sourceCode":"        }\n        // Remote\n        else {\n            $details = $this->requestPluginDetails($code);\n            $composerCode = $details['composer_code'] ?? '';\n            $composerVersion = $details['composer_version'] ?? '';\n        }\n\n        return [$composerCode, $composerVersion];\n    }\n\n    /**\n     * uninstallPlugin attempts to remove the plugin using composer before\n     * deleting from the filesystem\n     */\n    public function uninstallPlugin($name)\n    {\n        if (!$this->pluginManager->hasPlugin($name)) {\n            throw new ApplicationException(\"Plugin [$name] not found\");\n        }\n\n        // Remove via composer\n        $composer = ComposerManager::instance();\n        $composerCode = $this->pluginManager->getComposerCode($name);\n\n        if ($composerCode && $composer->hasPackage($composerCode)) {\n            $this->rollbackPlugin($name);\n            $composer->remove([$composerCode]);\n        }\n\n        $this->pluginManager->deletePlugin($name);\n    }\n\n    /**\n     * requestPluginDetails looks up a plugin from the update server\n     */\n    public function requestPluginDetails(string $name): array","sourceCodeStart":38,"sourceCodeEnd":74,"githubUrl":"https://github.com/octobercms/october/blob/b608633a7e8922487d91a8161499020121c3b3bf/modules/system/classes/updatemanager/ManagesPlugins.php#L38-L74","documentation":"UpdateManager::uninstallPlugin($name) first checks pluginManager->hasPlugin($name) and throws 'Plugin [$name] not found' when false — you cannot uninstall something the plugin manager does not see as installed. hasPlugin resolves by the Author.Plugin code against registered (filesystem) plugins, so a wrong code/casing or an already-deleted plugin directory both fail here. Note this check runs before any composer rollback/removal and before deletePlugin().","triggerScenarios":"`php artisan plugin:remove Author.Plugin` where the plugins/author/plugin directory is absent (already manually deleted), the code or casing doesn't match, or the plugin namespace is unregistered due to boot failure.","commonSituations":"Plugin files deleted via FTP/git but DB/artisan still asked to remove it; author directory casing differs from the code (acme.Blog vs Acme.Blog); a plugin disabled/removed by another admin moments earlier.","solutions":["Confirm the exact code with `php artisan plugin:list` (or by listing plugins/*/*) and retry with matching casing","If the directory is already gone, there is nothing to uninstall — clean up leftovers (permissions/DB records) instead of re-running remove","Restore the plugin files (git checkout / reinstall) first if you need a clean uninstall that rolls back versions","Use `php artisan plugin:refresh Author.Plugin` if the goal is re-installing its database structures"],"exampleFix":"// before — code doesn't match the registered plugin\ncd && php artisan plugin:remove acme.blog\n// after — exact Author.Plugin casing as registered\nphp artisan plugin:remove Acme.Blog","handlingStrategy":"validation","validationCode":"// Check registration state before attempting removal\n$code = 'Acme.Blog';\nif (!\\System\\Classes\\PluginManager::instance()->hasPlugin($code)) {\n    // not installed — check the filesystem to see if files were already deleted\n    if (!is_dir(plugins_path('acme/blog'))) {\n        // nothing to remove; clean up any leftover DB rows instead\n    }\n    return;\n}\n\\System\\Classes\\UpdateManager::instance()->uninstallPlugin($code);","typeGuard":null,"tryCatchPattern":"try {\n    \\System\\Classes\\UpdateManager::instance()->uninstallPlugin($name);\n} catch (\\October\\Rain\\Exception\\ApplicationException $ex) {\n    if (str_contains($ex->getMessage(), 'not found')) {\n        $this->error(\"Plugin {$name} is not installed — nothing to remove.\");\n        return 1;\n    }\n    throw $ex;\n}","preventionTips":["List installed plugins (`php artisan plugin:list`) before scripting removals","Always uninstall through artisan, never delete plugin directories by hand","Match Author.Plugin casing exactly — the manager resolves codes case-sensitively"],"tags":["octobercms","plugin","uninstall","marketplace","plugin-manager"],"backgroundTag":"package-not-installed","analyzedSha":"b608633a7e8922487d91a8161499020121c3b3bf","analyzedAt":"2026-08-21T04:24:57.515Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}