{"record":{"id":"629f8219c9cbdc90","repo":"jdx/mise","slug":"brew-cask-homebrew-owns-this-cask-remove-it-w","errorCode":null,"errorMessage":"brew-cask:{}: Homebrew owns this cask; remove it with Homebrew before installing it with mise","messagePattern":"brew-cask:(.+?): Homebrew owns this cask; remove it with Homebrew before installing it with mise","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/system/packages/brew/cask.rs","lineNumber":437,"sourceCode":"\n    async fn install_one_with_ancestors(\n        &self,\n        req: &PackageRequest,\n        opts: &InstallOpts,\n        pr: Option<&dyn SingleReport>,\n        ancestors: &BTreeSet<String>,\n        manager_options: &ManagerPackageOptions,\n    ) -> Result<String> {\n        let cask = fetch_cask(req).await?;\n        if ancestors.contains(&cask.token) {\n            bail!(\"brew-cask:{}: dependency cycle detected\", cask.token);\n        }\n        let mut ancestors = ancestors.clone();\n        ancestors.insert(cask.token.clone());\n        let artifacts = cask_artifacts(&cask)?;\n        validate_platform_support(&cask, &artifacts)?;\n        if homebrew_metadata_present(&cask.token) {\n            bail!(\n                \"brew-cask:{}: Homebrew owns this cask; remove it with Homebrew before installing it with mise\",\n                cask.token\n            );\n        }\n        let installed_version = installed_cask_version(&cask, &artifacts)?;\n        if let Some(version) = installed_version.as_ref()\n            && (cask.auto_updates || version == &cask.version)\n        {\n            info!(\"brew-cask:{}: already installed\", cask.token);\n            return Ok(version.clone());\n        }\n        for conflict in &cask.conflicts_with.cask {\n            if !installed_versions(conflict).is_empty() {\n                bail!(\n                    \"brew-cask:{}: conflicts with installed cask {}\",\n                    cask.token,\n                    conflict\n                );","sourceCodeStart":419,"sourceCodeEnd":455,"githubUrl":"https://github.com/jdx/mise/blob/6f52dcdf99e282ef7a7db68c81301fa4618d0f79/src/system/packages/brew/cask.rs#L419-L455","documentation":"install_one_with_ancestors (src/system/packages/brew/cask.rs:437) checks homebrew_metadata_present(token) before installing: if Homebrew's own receipts/metadata for that cask token exist, Homebrew already owns the artifact tree and mise refuses to touch it, so the two package managers never fight over the same cask.","triggerScenarios":"Running mise install for a cask token that `brew install --cask` previously installed (Homebrew Caskroom metadata present), including casks brew pulled in as dependencies of other packages.","commonSituations":"Machines that used Homebrew for years before adopting mise; casks installed by brew-based dotfile scripts; partial migrations where some casks were brew-managed and others mise-managed.","solutions":["Uninstall it with Homebrew first: brew uninstall --cask <token>, then re-run the mise command","Alternatively keep that cask under Homebrew and remove it from mise's package list so the managers stay separated","If brew already uninstalled the app but receipts remain, delete the leftover token directory under Homebrew's Caskroom and retry"],"exampleFix":"# before\n$ mise install brew-cask:slack\nerror: brew-cask:slack: Homebrew owns this cask; remove it with Homebrew before installing it with mise\n\n# after\n$ brew uninstall --cask slack\n$ mise install brew-cask:slack","handlingStrategy":"validation","validationCode":"# before mise-managing a cask, confirm Homebrew does not own it\nbrew list --cask --versions slack >/dev/null 2>&1 && echo 'brew owns this cask - uninstall first'","typeGuard":null,"tryCatchPattern":"On catching the error, shell out to `brew uninstall --cask <token>`, then retry the mise install once.","preventionTips":["Pick one manager per cask and record which one in your dotfiles","Before adding a cask to mise config, check it is not already brew-installed","Remove brew-installed casks during migration rather than layering mise on top"],"tags":["brew-cask","ownership","homebrew","conflict"],"backgroundTag":"package-ownership-conflict","analyzedSha":"6f52dcdf99e282ef7a7db68c81301fa4618d0f79","analyzedAt":"2026-08-22T10:14:23.840Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}