jdx/mise · error
brew-cask: : conflicts with installed cask
Error message
brew-cask:{}: conflicts with installed cask {} What it means
Before installing, the cask's `conflicts_with cask` list is checked against currently installed casks (via installed_versions). If any conflicting cask has installed versions, the install is aborted because Homebrew casks declare hard conflicts that would produce broken or duplicated system state.
Solutions
- Uninstall the conflicting cask first (`brew uninstall --cask <conflict>`) then retry.
- If both are truly needed, remove the conflicts_with entry in a local/forked cask (at your own risk).
- Choose an alternative cask that does not declare the conflict.
- Check which installed cask triggered it via the conflict name in the message and decide whether you still need it.
Example fix
// before brew install --cask newapp # conflicts with installed 'oldapp' // after brew uninstall --cask oldapp && install newapp via manager
Defensive patterns
Strategy: try-catch
Validate before calling
use std::process::Command;
fn cask_conflicts_with_installed(conflicts: &[&str]) -> Vec<String> {
conflicts.iter().filter(|c| {
Command::new("brew").args(["list", "--cask", c]).output()
.map(|o| o.status.success()).unwrap_or(false)
}).map(|c| c.to_string()).collect()
} Try / catch
match install_result {
Err(e) if e.to_string().contains("conflicts with installed cask") => {
let conflict = e.to_string().rsplit(' ').next().unwrap_or("<unknown>");
eprintln!("uninstall the conflicting cask first: brew uninstall --cask {conflict}");
}
other => other?,
} Prevention
- Check the cask's conflicts_with list against `brew list --cask` before installing.
- Uninstall superseded alternative tools when switching to a conflicting cask.
- Keep installed casks managed through one tool so conflicts stay visible.
- Review Homebrew cask conflicts announcements when updating tap metadata.
When it happens
Trigger: Installing cask X whose stanza lists `conflicts_with cask: 'Y'` while cask Y is already installed (installed_versions(Y) non-empty).
Common situations: Conflicting GUI apps from different vendors (e.g. two Dropbox-like clients); switching between alternative tools where the old cask was installed outside this manager; Homebrew adding a new conflicts_with entry to an existing cask.
Understand the failure class
Background: Conflicting config options: "cannot be used together" — configuration validation errors across open-source libraries — this error's family across 162 libraries.
Related errors
- brew-cask: cannot adopt
- brew-cask: : dependency cycle detected
- brew-cask: invalid app source
- brew-cask: refusing generic artifact source outside the…
- brew casks are installed at their current version
AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17).
Data as JSON: /api/errors/3016ef1f61b9dbd8.
Report an issue: GitHub.
Appendix: source
Thrown at src/system/packages/brew/cask/mod.rs:616
cask.token
);
return Ok(version);
}
let artifacts = cask_artifacts(&cask)?;
validate_platform_support(&cask, &artifacts)?;
// Validate the whole app batch before dependencies, downloads, or hooks
// can mutate anything, including when producing a dry-run plan.
artifacts.app_target_paths()?;
let installed_version = mise_installed_cask_version(&cask)?;
if let Some(reason) =
installed_skip_reason(&cask, &artifacts, installed_version.as_deref(), mode)?
{
info!("brew-cask:{}: {reason}", cask.token);
return Ok(reason.to_string());
}
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,
desired: super::super::PackageDesiredState::Present,
})
.collect::<Vec<_>>();View on GitHub (pinned to 533346cc37)