jdx/mise · error
brew-cask:{}: pkg artifacts require pkgutil ids in uninstall
Error message
brew-cask:{}: pkg artifacts require pkgutil ids in uninstall metadata What it means
mise uses macOS pkgutil receipts to know which packages a cask's pkg artifacts installed, so it can uninstall and track them. After collecting artifacts it requires: if any 'pkg' artifacts exist, the cask's uninstall metadata must declare at least one pkgutil id. When pkgs are present but the pkgutil list is empty, install aborts — otherwise mise would install a pkg it could never cleanly uninstall.
Source
Thrown at src/system/packages/brew/cask.rs:5022
&& artifacts.command_wrappers.is_empty()
&& artifacts.pkgs.is_empty()
&& artifacts.installers.is_empty()
&& artifacts.generic.is_empty()
&& artifacts.fonts.is_empty()
&& artifacts.completions.is_empty()
&& artifacts.generated_completions.is_empty()
{
bail!(
"brew-cask:{}: no supported install artifact found",
cask.token
);
}
artifacts.pkg_ids.sort();
artifacts.pkg_ids.dedup();
if artifacts.pkgs.is_empty() {
artifacts.pkg_ids.clear();
} else if artifacts.pkg_ids.is_empty() {
bail!(
"brew-cask:{}: pkg artifacts require pkgutil ids in uninstall metadata",
cask.token
);
}
Ok(artifacts)
}
fn validate_platform_support(cask: &Cask, artifacts: &CaskArtifacts) -> Result<()> {
#[cfg(target_os = "linux")]
{
let font_only = !artifacts.fonts.is_empty()
&& artifacts.apps.is_empty()
&& artifacts.binaries.is_empty()
&& artifacts.command_wrappers.is_empty()
&& artifacts.pkgs.is_empty()
&& artifacts.installers.is_empty()
&& artifacts.generic.is_empty()
&& artifacts.completions.is_empty()View on GitHub (pinned to 6f52dcdf99)
Solutions
- If you author the cask: install the pkg once manually, run `pkgutil --pkgs | grep -i <name>` to find the receipt id, and add it under uninstall.pkgutil.
- If the metadata is third-party, report the missing receipts upstream.
- As an end user, install that cask with real Homebrew (brew handles receipts differently) instead of mise.
- Verify with the API JSON that uninstall.pkgutil truly is absent before assuming a mise bug.
Example fix
# before
artifacts: [{ pkg: "Installer.pkg" }]
uninstall: {}
# after
artifacts: [{ pkg: "Installer.pkg" }]
uninstall: { pkgutil: ["com.example.mytool"] } Defensive patterns
Strategy: validation
Validate before calling
# custom casks with pkg artifacts must carry pkgutil receipts jq -e 'select(([.artifacts[]? | keys[]?] | any(. == "pkg")) | not or ([.uninstall.pkgutil // []] | flatten | length) > 0)' cask.json >/dev/null || echo 'missing uninstall.pkgutil'
Prevention
- After authoring a pkg cask, install once and harvest receipts via `pkgutil --pkgs`.
- Make pkgutil receipts a required field in your cask metadata schema.
- Validate custom metadata with jq before committing it.
When it happens
Trigger: Cask metadata with `artifacts: [{pkg: ...}]` but no `uninstall: {pkgutil: [...]}` receipts (see the branch at src/system/packages/brew/cask.rs:5022). Typical of hand-written metadata, converted casks, or upstream casks that rely on other receipt kinds (launchservices, quit scripts) without pkgutil entries.
Common situations: Authoring a custom cask JSON for an internal .pkg and forgetting receipts; upstream casks whose uninstall uses only `delete`/`launchctl` stanzas; schema drift where the pkgutil field was renamed.
Related errors
- `defaults {display}` failed: {}
- `defaults {}` failed: {}
- ditto failed copying {} to {}
- brew-cask: completion executable '{}' is ambiguous: {}
- brew-cask: failed to generate {} completions from {}: {}
AI-assisted analysis of jdx/mise@6f52dcdf99 (2026-08-22).
Data as JSON: /api/errors/666704c5f4086763.
Report an issue: GitHub.