jdx/mise · error · eyre::Report
manager '{}' is excluded by the system_packages.managers set
Error message
manager '{}' is excluded by the system_packages.managers setting What it means
Thrown by `mise bootstrap packages prune --manager <m>` when the requested package manager is not in the user's `system_packages.managers` setting. That setting acts as an allowlist: once it is set, only managers listed there may be bootstrapped or pruned. The guard in SystemPrune::run (src/cli/system/prune.rs:44) fires before any plan is computed or package touched.
Source
Thrown at src/cli/system/prune.rs:44
/// Print what would be removed without deleting anything
#[clap(long, short = 'n')]
dry_run: bool,
/// Skip the confirmation prompt
#[clap(long, short)]
yes: bool,
}
impl SystemPrune {
pub async fn run(self) -> Result<()> {
if Settings::get()
.system_packages
.managers
.as_ref()
.is_some_and(|enabled| !enabled.contains(&self.manager))
{
bail!(
"manager '{}' is excluded by the system_packages.managers setting",
self.manager
);
}
match self.manager.as_str() {
"brew" => self.run_brew().await,
"brew-cask" => self.run_brew_cask().await,
_ => unreachable!(),
}
}
#[cfg(unix)]
async fn run_brew(self) -> Result<()> {
debug_assert_eq!(self.manager, "brew");
let manager = brew::BrewManager::new();
if !manager.is_available() {
bail!("brew is not available: {}", manager.unavailable_reason());
}View on GitHub (pinned to 9dcfcaa0dc)
Solutions
- Add the manager to the allowlist: `mise settings set system_packages.managers '[brew, brew-cask]'` (or edit mise.toml) and keep any managers already present
- Alternatively prune a manager that is already in the list, e.g. `mise bootstrap packages prune --manager <listed-manager>`
- Or remove the `system_packages.managers` setting entirely so no allowlist filtering happens
- Verify the effective value first with `mise settings get system_packages.managers`
Example fix
# before system_packages.managers = ["apt"] $ mise bootstrap packages prune --manager brew # error: manager 'brew' is excluded by the system_packages.managers setting # after system_packages.managers = ["apt", "brew"] $ mise bootstrap packages prune --manager brew
Defensive patterns
Strategy: validation
Validate before calling
# before pruning, confirm the manager passes the allowlist mgr="brew" allowed="$(mise settings get system_packages.managers 2>/dev/null)" if [ -n "$allowed" ] && ! printf '%s' "$allowed" | grep -qw "$mgr"; then echo "skip: $mgr excluded by system_packages.managers" >&2 exit 0 fi mise bootstrap packages prune --manager "$mgr"
Try / catch
mise bootstrap packages prune --manager "$mgr" || case $? in *) echo "prune failed for $mgr — check system_packages.managers allowlist" >&2; exit 1;; esac
Prevention
- Keep one canonical system_packages.managers per OS (mise.macos.toml / mise.linux.toml) instead of a shared list
- Document the allowlist next to bootstrap scripts so operators know prune targets must be members
- Assert the setting contains every manager your scripts prune, in a config-lint step
When it happens
Trigger: Running `mise bootstrap packages prune --manager brew` (or `--manager brew-cask`) while settings contain e.g. `system_packages.managers = ["apt"]` — any defined list that does not include the requested manager name.
Common situations: Copying a mise.toml from a Linux machine (apt-only allowlist) to a macOS machine and running brew prune; removing brew from the allowlist earlier and forgetting; typo'd manager name inside the managers array.
Related errors
- brew is not available: {}
- brew prune is not supported on windows
- manager '{}' is excluded by the system_packages.managers set
- brew-cask is not available: {}
- brew-cask prune is not supported on windows
AI-assisted analysis of jdx/mise@9dcfcaa0dc (2026-08-17).
Data as JSON: /api/errors/f8a25d61092de8bb.
Report an issue: GitHub.