{"record":{"id":"93ed5926fe1a9d28","repo":"jdx/mise","slug":"brew-cask-conflicts-with-installed-cask","errorCode":null,"errorMessage":"brew-cask:{}: conflicts with installed cask {}","messagePattern":"brew-cask:(.+?): conflicts with installed cask (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/system/packages/brew/cask.rs","lineNumber":451,"sourceCode":"        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                );\n            }\n        }\n        if !cask.depends_on.formula.is_empty() {\n            let dependencies = cask\n                .depends_on\n                .formula\n                .iter()\n                .map(|name| PackageRequest {\n                    name: name.clone(),\n                    version: None,\n                    tap_url: None,\n                })\n                .collect::<Vec<_>>();\n            super::BrewManager::new()","sourceCodeStart":433,"sourceCodeEnd":469,"githubUrl":"https://github.com/jdx/mise/blob/6f52dcdf99e282ef7a7db68c81301fa4618d0f79/src/system/packages/brew/cask.rs#L433-L469","documentation":"install_one_with_ancestors (src/system/packages/brew/cask.rs:451) honors the cask's conflicts_with.cask stanza from its API metadata: for each declared conflicting cask token it checks installed_versions, and if any is already installed the install aborts rather than overwrite an app the conflict declaration exists to protect.","triggerScenarios":"Installing a cask whose JSON declares conflicts_with.cask entries while one of those tokens is installed on the machine — typical for apps that install the same kernel extensions, privileged helpers, or system handlers (two VPN clients, two virtualization tools, competing browsers registering defaults).","commonSituations":"Switching between competing apps that hook the same OS integration; corporate images that pre-install one side of a conflicting pair; reinstalling after switching managers without removing the competitor first.","solutions":["Uninstall the conflicting cask named in the message — mise uninstall it if mise owns it, or brew uninstall --cask <name> if brew does","Confirm the conflict by reading the cask's conflicts_with stanza in its api/cask/<token>.json","If the conflict is stale (the app was removed by hand), clean up leftover receipts so installed_versions stops detecting it, then retry"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"# inspect the cask's declared conflicts before installing\ncurl -s \"https://formulae.brew.sh/api/cask/firefox.json\" | jq -r '.conflicts_with.cask[]?'","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Check a cask's conflicts_with stanza before requesting it on shared images","Remove the competing app before switching between conflicting casks","Keep install receipts clean so stale conflicts are not detected after manual removals"],"tags":["brew-cask","conflict","homebrew"],"backgroundTag":"package-conflict","analyzedSha":"6f52dcdf99e282ef7a7db68c81301fa4618d0f79","analyzedAt":"2026-08-22T10:14:23.840Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}