asdf-vm/asdf · error

No such plugin: %s

Error message

No such plugin: %s

What it means

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.

Source

Thrown at internal/plugins/plugins.go:443

	return nil
}

// Remove uninstalls a plugin by removing it from the file system if installed
func Remove(config config.Config, pluginName string, stdout, stderr io.Writer) error {
	err := validatePluginName(pluginName)
	if err != nil {
		return err
	}

	plugin := New(config, pluginName)

	exists, err := PluginExists(config.DataDir, pluginName)
	if err != nil {
		return fmt.Errorf("unable to check if plugin exists: %w", err)
	}

	if !exists {
		return fmt.Errorf("No such plugin: %s", pluginName)
	}

	hook.Run(config, "pre_asdf_plugin_remove", []string{plugin.Name})
	hook.Run(config, fmt.Sprintf("pre_asdf_plugin_remove_%s", plugin.Name), []string{})

	env := map[string]string{
		"ASDF_PLUGIN_PATH":       plugin.Dir,
		"ASDF_PLUGIN_SOURCE_URL": plugin.URL,
	}
	plugin.RunCallback("pre-plugin-remove", []string{}, env, stdout, stderr)

	pluginDir := data.PluginDirectory(config.DataDir, pluginName)
	downloadDir := data.DownloadDirectory(config.DataDir, pluginName)
	installDir := data.InstallDirectory(config.DataDir, pluginName)

	err = os.RemoveAll(downloadDir)
	err2 := os.RemoveAll(pluginDir)
	err3 := os.RemoveAll(installDir)

View on GitHub (pinned to 074a1722ca)

Solutions

  1. List installed plugins (`asdf plugin list`) to confirm the exact name
  2. Fix the plugin name spelling and retry
  3. Add the plugin first (`asdf plugin add <name>`) if it was never installed
  4. Check ASDF_DATA_DIR matches where the plugin was originally added

Example fix

// before
plugins.Remove(conf, "nodjs", os.Stdout, os.Stderr) // typo
// after
plugins.Remove(conf, "nodejs", os.Stdout, os.Stderr)
Defensive patterns

Strategy: validation

Validate before calling

exists, _ := plugins.PluginExists(conf.DataDir, pluginName)
if !exists {
    return nil // nothing to remove; skip Remove call
}

Try / catch

if err != nil && strings.HasPrefix(err.Error(), "No such plugin:") {
    // treat as already-removed / idempotent no-op
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of asdf-vm/asdf@074a1722ca (2026-08-30). Data as JSON: /api/errors/233f1dfd8ffe84f7. Report an issue: GitHub.