jdx/mise · error
brew-cask:{}: Homebrew owns this cask; remove it with Homebr
Error message
brew-cask:{}: Homebrew owns this cask; remove it with Homebrew before installing it with mise What it means
Before installing a cask, mise checks whether the Caskroom token directory contains Homebrew's `.metadata` marker (homebrew_metadata_present). If it exists, the cask was installed by Homebrew itself; mise refuses to take over an install it does not own, because overwriting would corrupt brew's receipts and break `brew upgrade`/`uninstall`.
Source
Thrown at src/system/packages/brew/cask.rs:384
}
async fn install_one_with_ancestors(
&self,
req: &PackageRequest,
opts: &InstallOpts,
pr: Option<&dyn SingleReport>,
ancestors: &BTreeSet<String>,
) -> Result<String> {
let cask = fetch_cask(req).await?;
if ancestors.contains(&cask.token) {
bail!("brew-cask:{}: dependency cycle detected", cask.token);
}
let mut ancestors = ancestors.clone();
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
);
}
if installed_cask_version(&cask, &artifacts)?.as_deref() == Some(cask.version.as_str()) {
info!("brew-cask:{}: already installed", cask.token);
return Ok(cask.version);
}
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() {View on GitHub (pinned to 9dcfcaa0dc)
Solutions
- Uninstall the brew copy first: `brew uninstall --cask <token>`, then re-run the mise command
- Or keep managing that cask with brew and remove it from mise's bootstrap/tools config
Example fix
# before $ mise install brew-cask:google-chrome error: brew-cask:google-chrome: Homebrew owns this cask; remove it with Homebrew before installing it with mise # after $ brew uninstall --cask google-chrome $ mise install brew-cask:google-chrome
Defensive patterns
Strategy: validation
Validate before calling
// Rust callers using mise internals can pre-check:
fn homebrew_owns(token: &str) -> bool {
std::path::Path::new(&caskroom(token)).join(".metadata").symlink_metadata().is_ok()
}
// Shell users: ls "$(brew --prefix)/Caskroom/<token>/.metadata" 2>/dev/null && echo brew-owned Try / catch
Catch the 'Homebrew owns this cask' bail, print `brew uninstall --cask <token>` as remediation, and continue with the remaining packages in the batch.
Prevention
- Choose one manager per cask: brew or mise, never both
- Before adopting mise bootstrap on a brew-managed machine, uninstall casks you plan to hand to mise
- Check for .metadata in the Caskroom token dir when scripting installs
When it happens
Trigger: Running mise install/bootstrap for a cask (e.g. brew-cask:visual-studio-code) that was previously installed with `brew install --cask <token>`, so <Caskroom>/<token>/.metadata exists.
Common situations: Migrating a machine from brew to mise-managed bootstrap; shared machines where another user installed via brew; CI images that pre-install casks with brew and then run mise bootstrap.
Related errors
- brew-cask:{}: dependency cycle detected
- brew-cask:{}: conflicts with installed cask {}
- brew-cask:{}: Homebrew took ownership of this cask while ins
- brew casks are installed at their current version ('{p}')
- brew-cask: unsupported tap URL for '{name}'; only GitHub tap
AI-assisted analysis of jdx/mise@9dcfcaa0dc (2026-08-17).
Data as JSON: /api/errors/629f8219c9cbdc90.
Report an issue: GitHub.