{"record":{"id":"d35440e4a61deff1","repo":"jdx/mise","slug":"package-plugin-collides-with-a-built-in-packa","errorCode":null,"errorMessage":"package plugin '{}' collides with a built-in package manager","messagePattern":"package plugin '(.+?)' collides with a built-in package manager","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/plugins/vfox_plugin.rs","lineNumber":298,"sourceCode":"                        Err(PluginNotInstalled(self.name.clone()))?\n                    }\n                }\n            }\n        }\n\n        let prefix = format!(\"plugin:{}\", style(&self.name).blue().for_stderr());\n        let pr = mpr.add_with_options(&prefix, dry_run);\n        if !dry_run {\n            let plugin_lock = lock_file::get(&self.plugin_path, force)?;\n            self.install(config, pr.as_ref()).await?;\n            let plugin_type =\n                PluginType::from_plugin_path(&self.plugin_path).unwrap_or(PluginType::Vfox);\n            if plugin_type == PluginType::Package\n                && crate::system::packages::is_builtin_manager_name(&self.name)\n            {\n                drop(plugin_lock);\n                file::remove_all(&self.plugin_path)?;\n                bail!(\n                    \"package plugin '{}' collides with a built-in package manager\",\n                    self.name\n                );\n            }\n            install_state::add_plugin(&self.name, plugin_type).await?;\n            backend::remove(&self.name);\n            warn_if_env_plugin_shadows_registry(&self.name, &self.plugin_path);\n        }\n        Ok(())\n    }\n\n    async fn update(&self, pr: &dyn SingleReport, gitref: Option<String>) -> Result<()> {\n        // If only embedded (no filesystem plugin), warn that it can't be updated\n        if self.is_embedded() && !self.plugin_path.exists() {\n            warn!(\n                \"plugin:{} is embedded in mise, not updating\",\n                style(&self.name).blue().for_stderr()\n            );","sourceCodeStart":280,"sourceCodeEnd":316,"githubUrl":"https://github.com/jdx/mise/blob/9dcfcaa0dc8747a2577d3270b69bb9d8313b2807/src/plugins/vfox_plugin.rs#L280-L316","documentation":"mise refuses to install a package-type plugin (PluginType::Package) whose name matches one of its built-in system package managers: apk, apt, brew, brew-cask, dnf, flatpak, flatpak-user, mas, pacman (checked via system::packages::is_builtin_manager_name). The check runs inside VfoxPlugin::install after the plugin has been cloned, so mise drops the plugin lock, deletes the freshly cloned plugin_path, and fails the install. This prevents a third-party plugin from shadowing the built-in manager used by [packages] config entries like \"apt:curl = '1.0'\".","triggerScenarios":"Running `mise plugin add <name> <repo>` (or `mise plugins install`) where the plugin resolves to a package plugin (e.g. it declares a mise.plugin.toml package interface) and its name is exactly one of apk/apt/brew/brew-cask/dnf/flatpak/flatpak-user/mas/pacman. The failure happens post-clone, before install_state::add_plugin and backend::remove run, so no residual plugin state is kept.","commonSituations":"Writing a custom package-manager plugin and naming it after the OS manager it wraps (e.g. an 'apt' plugin for a Debian derivative); forking an existing package plugin and keeping the colliding repo name; migrating a config that previously used a community 'brew' plugin before brew became built-in.","solutions":["Rename the plugin to a non-reserved name (e.g. my-apt, company-brew) both in the repo/mise.plugin.toml and in the `mise plugin add` command, then reinstall.","If you actually wanted the OS package manager, do not install a plugin at all: use the built-in manager via [packages] config keys like \"apt:htop\" or \"brew:ripgrep\".","Pick a name not in the reserved list: apk, apt, brew, brew-cask, dnf, flatpak, flatpak-user, mas, pacman.","If the colliding plugin was already partially registered, run `mise plugin remove <name>` to clean up before retrying with the new name."],"exampleFix":"# before\nmise plugin add apt https://github.com/acme/apt-package-plugin\n# after\nmise plugin add acme-apt https://github.com/acme/apt-package-plugin\n\n# or, if the goal is installing OS packages, skip the plugin entirely:\n# mise.toml\n[packages]\n\"apt:htop\" = \"3.3.0\"","handlingStrategy":"validation","validationCode":"#!/usr/bin/env bash\nname=\"$1\"\nreserved=\"apk apt brew brew-cask dnf flatpak flatpak-user mas pacman\"\ncase \" $reserved \" in\n  *\" $name \"*) echo \"error: '$name' collides with a built-in package manager\" >&2; exit 1 ;;\nesac\nmise plugin add \"$name\" \"${@:2}\"","typeGuard":null,"tryCatchPattern":"In scripts, capture stderr and exit code of `mise plugin add`; on non-zero exit, grep stderr for 'collides with a built-in package manager' and surface a rename hint instead of retrying the same name.","preventionTips":["Treat apk/apt/brew/brew-cask/dnf/flatpak/flatpak-user/mas/pacman as reserved when naming plugins.","Prefer the [packages] config table for OS packages; plugins are for tools, not for wrapping built-in managers.","Namespace custom plugin names (org- or company- prefix) to avoid future collisions with new built-ins."],"tags":["mise","plugin","package-manager","name-collision","install"],"backgroundTag":"reserved-name-collision","analyzedSha":"9dcfcaa0dc8747a2577d3270b69bb9d8313b2807","analyzedAt":"2026-08-17T14:28:50.624Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}