Homebrew/homebrew-cask · warning

Unable to forcibly close zoom.us.app

Error message

Unable to forcibly close zoom.us.app

What it means

Printed by the terminate_process step in zoom's postflight_steps (Casks/z/zoom.rb:38). Zoom's .pkg postinstall runs `open "$APP_PATH"&`, auto-launching zoom.us.app; Homebrew then runs `/usr/bin/pkill -f /Applications/zoom.us.app` up to 3 times, 1 second apart, to keep the install non-interactive. pkill exits non-zero when no running process's full command line contains /Applications/zoom.us.app or when the signal cannot be delivered; after the final attempt Homebrew prints this failure_message as a `Warning:` via opoo. Because `must_succeed: false` is set, the warning never aborts the install — it only means the pattern went unmatched.

Source

Thrown at Casks/z/zoom.rb:38

  conflicts_with cask: "zoom-for-it-admins"
  depends_on :macos

  pkg "zoomusInstallerFull.pkg"

  postflight_steps do
    # Description: Ensure console variant of postinstall is non-interactive.
    # This is because `open "$APP_PATH"&` is called from the postinstall
    # script of the package and we don't want any user intervention there.
    terminate_process(
      "/Applications/zoom.us.app",
      match:           :full,
      attempts:        3,
      must_succeed:    false,
      notices:         [
        "The Zoom package postinstall script launches the Zoom app",
        "Attempting to close zoom.us.app to avoid unwanted user intervention",
      ],
      failure_message: "Unable to forcibly close zoom.us.app",
    )
  end

  uninstall launchctl: [
              "us.zoom.updater",
              "us.zoom.updater.login.check",
              "us.zoom.ZoomDaemon",
            ],
            signal:    ["KILL", "us.zoom.xos"],
            pkgutil:   "us.zoom.pkg.videomeeting",
            delete:    [
              "/Applications/zoom.us.app",
              "/Library/Internet Plug-Ins/ZoomUsPlugIn.plugin",
              "/Library/Logs/DiagnosticReports/zoom.us*",
              "/Library/PrivilegedHelperTools/us.zoom.ZoomDaemon",
            ]

  zap trash: [

View on GitHub (pinned to 8587086220)

Solutions

  1. If brew completed, treat the warning as advisory (`must_succeed: false`); quit any leftover Zoom with `pkill -f /Applications/zoom.us.app`.
  2. Quit Zoom before the operation (`osascript -e 'quit app "zoom.us.app"'` or menu-bar Quit), then re-run `brew reinstall --cask zoom`.
  3. If Zoom reopens immediately, unload the daemons first: `launchctl bootout gui/$(id -u)/us.zoom.ZoomDaemon` and `us.zoom.updater`, then retry.
  4. Verify with `pgrep -fl zoom.us.app` the real running path; if it differs from the cask's literal path, the cask is stale — `brew edit --cask zoom` and open a PR.
  5. Confirm success with `brew list --cask --versions zoom` instead of re-running blindly.

Example fix

# before
brew upgrade --cask zoom
# Warning: Unable to forcibly close zoom.us.app

# after: quit Zoom and its daemon, then upgrade
osascript -e 'quit app "zoom.us.app"' || pkill -f '/Applications/zoom.us.app'
launchctl bootout gui/$(id -u)/us.zoom.ZoomDaemon 2>/dev/null || true
brew upgrade --cask zoom
Defensive patterns

Strategy: validation

Validate before calling

# Quit Zoom and its daemon before brew install/upgrade:
osascript -e 'quit app "zoom.us.app"' 2>/dev/null || pkill -f '/Applications/zoom.us.app' 2>/dev/null || true
launchctl bootout gui/$(id -u)/us.zoom.ZoomDaemon 2>/dev/null || true
brew reinstall --cask zoom

Try / catch

begin
  Homebrew::SystemCommand.run!("/usr/bin/pkill", args: ["-f", "/Applications/zoom.us.app"])
rescue ErrorDuringExecution
  # Nothing matched: Zoom never launched (headless install) or the launch
  # outran the 3x1s retry window. Non-fatal by design.
  warn "Unable to forcibly close zoom.us.app"
end

Prevention

When it happens

Trigger: `brew install|upgrade|reinstall --cask zoom` where every pkill attempt fails: the app never launched (headless Mac, CI, no GUI login, or the pkg skipped auto-open), the launch outlasted the ~3x1s retry window, a running copy executes from a different path (renamed or moved bundle), or Zoom's daemons (us.zoom.ZoomDaemon, us.zoom.updater — see the uninstall stanza, which also KILLs us.zoom.xos) interfered with the user-level pkill.

Common situations: Managed fleets and CI runners installing zoom with no logged-in desktop user; user quits Zoom during the retry window; slow launch after `open &`; vendor renaming the bundle in a pkg revision; an existing manual Zoom install running from another location.

Related errors


AI-assisted analysis of Homebrew/homebrew-cask@8587086220 (2026-08-21). Data as JSON: /api/errors/5950ffb2fc5e18a0. Report an issue: GitHub.