{"record":{"id":"233f1dfd8ffe84f7","repo":"asdf-vm/asdf","slug":"no-such-plugin-s-233f1d","errorCode":null,"errorMessage":"No such plugin: %s","messagePattern":"No such plugin: (.+?)","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/plugins/plugins.go","lineNumber":443,"sourceCode":"\treturn nil\n}\n\n// Remove uninstalls a plugin by removing it from the file system if installed\nfunc Remove(config config.Config, pluginName string, stdout, stderr io.Writer) error {\n\terr := validatePluginName(pluginName)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tplugin := New(config, pluginName)\n\n\texists, err := PluginExists(config.DataDir, pluginName)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"unable to check if plugin exists: %w\", err)\n\t}\n\n\tif !exists {\n\t\treturn fmt.Errorf(\"No such plugin: %s\", pluginName)\n\t}\n\n\thook.Run(config, \"pre_asdf_plugin_remove\", []string{plugin.Name})\n\thook.Run(config, fmt.Sprintf(\"pre_asdf_plugin_remove_%s\", plugin.Name), []string{})\n\n\tenv := map[string]string{\n\t\t\"ASDF_PLUGIN_PATH\":       plugin.Dir,\n\t\t\"ASDF_PLUGIN_SOURCE_URL\": plugin.URL,\n\t}\n\tplugin.RunCallback(\"pre-plugin-remove\", []string{}, env, stdout, stderr)\n\n\tpluginDir := data.PluginDirectory(config.DataDir, pluginName)\n\tdownloadDir := data.DownloadDirectory(config.DataDir, pluginName)\n\tinstallDir := data.InstallDirectory(config.DataDir, pluginName)\n\n\terr = os.RemoveAll(downloadDir)\n\terr2 := os.RemoveAll(pluginDir)\n\terr3 := os.RemoveAll(installDir)","sourceCodeStart":425,"sourceCodeEnd":461,"githubUrl":"https://github.com/asdf-vm/asdf/blob/074a1722ca88d6677f228541ce06efaf4f9924d4/internal/plugins/plugins.go#L425-L461","documentation":"Remove validates the name, then checks whether the plugin is actually installed by looking for its directory under the data dir. If no such directory exists, it returns this error — the requested plugin was never added (or was already removed). It is asdf's 'nothing to remove' signal.","triggerScenarios":"plugins.Remove (or `asdf plugin remove <name>`) for a name that has no directory at data.PluginDirectory(dataDir, name): never added, misspelled name, or removed from a different ASDF_DATA_DIR.","commonSituations":"Typo in plugin name, running asdf with a different ASDF_DATA_DIR than the one where the plugin was added, or removing a plugin after a partial/cleaned install.","solutions":["List installed plugins (`asdf plugin list`) to confirm the exact name","Fix the plugin name spelling and retry","Add the plugin first (`asdf plugin add <name>`) if it was never installed","Check ASDF_DATA_DIR matches where the plugin was originally added"],"exampleFix":"// before\nplugins.Remove(conf, \"nodjs\", os.Stdout, os.Stderr) // typo\n// after\nplugins.Remove(conf, \"nodejs\", os.Stdout, os.Stderr)","handlingStrategy":"validation","validationCode":"exists, _ := plugins.PluginExists(conf.DataDir, pluginName)\nif !exists {\n    return nil // nothing to remove; skip Remove call\n}","typeGuard":null,"tryCatchPattern":"if err != nil && strings.HasPrefix(err.Error(), \"No such plugin:\") {\n    // treat as already-removed / idempotent no-op\n}","preventionTips":["Check `asdf plugin list` before removing","Make remove logic idempotent by pre-checking PluginExists"],"tags":["plugin-management","asdf","not-found"],"backgroundTag":"plugin-not-installed","analyzedSha":"074a1722ca88d6677f228541ce06efaf4f9924d4","analyzedAt":"2026-08-30T19:56:42.972Z","schemaVersion":2},"datasetVersion":"2026-08-30T23:17:21.991Z"}