jdx/mise · error

package plugin '{}' does not support uninstall; add hooks/pa

Error message

package plugin '{}' does not support uninstall; add hooks/package_uninstall.lua

What it means

After computing a prune plan with removable packages, run_plugin checks `manager.supports_uninstall()`. A plugin that lacks `hooks/package_uninstall.lua` cannot perform removals, so mise bails instead of leaving the plan partially applied. The error names the exact missing hook file.

Source

Thrown at src/cli/system/prune.rs:100

            bail!("{} is not available: {reason}", self.manager);
        }
        let manager = PackagePluginManager::new(self.manager.clone())?;
        let config = Config::get().await?;
        let configured = system::package_requests_for_manager_from_config_and_tracked_config_files(
            &config,
            &self.manager,
        )
        .await?;
        let plan = manager.prune_plan(&configured).await?;
        if plan.is_empty() {
            if !self.dry_run {
                manager.apply_prune_plan(&plan).await?;
            }
            info!("{}: nothing to prune", self.manager);
            return Ok(());
        }
        if !manager.supports_uninstall() {
            bail!(
                "package plugin '{}' does not support uninstall; add hooks/package_uninstall.lua",
                self.manager
            );
        }
        let remove = plan
            .remove
            .iter()
            .map(ToString::to_string)
            .collect::<Vec<_>>();
        if self.dry_run {
            for package in &remove {
                miseprintln!("remove {}:{package}", self.manager);
            }
            return Ok(());
        }
        if !self.yes && !Settings::get().yes && console::user_attended_stderr() {
            let msg = format!("{}: prune {}?", self.manager, remove.join(", "));
            if !prompt::confirm(msg)?.is_yes() {

View on GitHub (pinned to afd2eddd3a)

Solutions

  1. Add a `hooks/package_uninstall.lua` hook to the plugin and implement package removal.
  2. Remove the packages the plan targets manually via the manager's own CLI.
  3. Switch to a plugin that supports uninstall.
  4. Report/request uninstall support upstream for the plugin.

Example fix

// before: plugin directory lacks the hook
plugins/myplugin/hooks/install.lua
// after
plugins/myplugin/hooks/install.lua
plugins/myplugin/hooks/package_uninstall.lua  -- implement removal for the given package request
Defensive patterns

Strategy: validation

Validate before calling

test -f ~/.local/share/mise/plugins/myplugin/hooks/package_uninstall.lua && echo ok || echo "plugin cannot uninstall"

Prevention

When it happens

Trigger: Running `mise system prune --manager <plugin>` where the plugin has install hooks but no `package_uninstall.lua`, and the computed plan contains packages to remove.

Common situations: Third-party vfox plugins that only implement install; hand-written plugins missing the uninstall hook; plugin updated upstream dropping the uninstall hook.

Related errors


AI-assisted analysis of jdx/mise@afd2eddd3a (2026-09-09). Data as JSON: /api/errors/cc56af2d58dcf493. Report an issue: GitHub.