jdx/mise · error

brew-cask: : conflicts with installed cask

Error message

brew-cask:{}: conflicts with installed cask {}

What it means

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.

Solutions

  1. Uninstall the conflicting cask named in the message — mise uninstall it if mise owns it, or brew uninstall --cask <name> if brew does
  2. Confirm the conflict by reading the cask's conflicts_with stanza in its api/cask/<token>.json
  3. If the conflict is stale (the app was removed by hand), clean up leftover receipts so installed_versions stops detecting it, then retry
Defensive patterns

Strategy: validation

Validate before calling

# inspect the cask's declared conflicts before installing
curl -s "https://formulae.brew.sh/api/cask/firefox.json" | jq -r '.conflicts_with.cask[]?'

Prevention

When it happens

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

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

Related errors


AI-assisted analysis of jdx/mise@6f52dcdf99 (2026-08-22). Data as JSON: /api/errors/93ed5926fe1a9d28. Report an issue: GitHub.

Appendix: source

Thrown at src/system/packages/brew/cask.rs:451

        ancestors.insert(cask.token.clone());
        let artifacts = cask_artifacts(&cask)?;
        validate_platform_support(&cask, &artifacts)?;
        if homebrew_metadata_present(&cask.token) {
            bail!(
                "brew-cask:{}: Homebrew owns this cask; remove it with Homebrew before installing it with mise",
                cask.token
            );
        }
        let installed_version = installed_cask_version(&cask, &artifacts)?;
        if let Some(version) = installed_version.as_ref()
            && (cask.auto_updates || version == &cask.version)
        {
            info!("brew-cask:{}: already installed", cask.token);
            return Ok(version.clone());
        }
        for conflict in &cask.conflicts_with.cask {
            if !installed_versions(conflict).is_empty() {
                bail!(
                    "brew-cask:{}: conflicts with installed cask {}",
                    cask.token,
                    conflict
                );
            }
        }
        if !cask.depends_on.formula.is_empty() {
            let dependencies = cask
                .depends_on
                .formula
                .iter()
                .map(|name| PackageRequest {
                    name: name.clone(),
                    version: None,
                    tap_url: None,
                })
                .collect::<Vec<_>>();
            super::BrewManager::new()

View on GitHub (pinned to 6f52dcdf99)