Skip to content

Fleet-maintained apps: Teleport Suite (macOS) uninstall leaves the tsh and tctl package receipts behind #58675

Open

Description

@Brajim20

Fleet versions

  • Discovered: rc-minor-fleet-v4.95.0 (20e1bbb)

Web browser and operating system: N/A (macOS host, Fleet-maintained app uninstall script)


💥 Actual behavior

Uninstalling the Teleport Suite Fleet-maintained app removes tsh.app, tctl.app and the /usr/local/bin links, but leaves the tsh and tctl package receipts registered. The uninstall output shows the script passing the cask's wildcard IDs to pkgutil literally:

pkgutil --pkg-info-plist "(.*).com.gravitational.teleport.tctl"
No receipt for '(.*).com.gravitational.teleport.tctl' found at '/'.
...
No receipt for '(.*).com.gravitational.teleport.tsh' found at '/'.

After the uninstall, pkgutil --pkgs | grep -i teleport still returns:

QH8AA5B8UP.com.gravitational.teleport.tctl
QH8AA5B8UP.com.gravitational.teleport.tsh

and the next install of Teleport Suite reports installer: Upgrading at base path / instead of a fresh install.

🛠️ Expected behavior

The uninstall removes the QH8AA5B8UP.com.gravitational.teleport.tsh and .tctl receipts, as the cask's uninstall pkgutil list ((.*).com.gravitational.teleport.tctl, (.*).com.gravitational.teleport.tsh) and the script's own comment ("handles wildcard patterns with (.*)") say it should.

🧑‍💻 Steps to reproduce

These steps:

  • Have been confirmed to consistently lead to reproduction in multiple Fleet instances.
  • Describe the workflow that led to the error, but have not yet been reproduced in multiple Fleet instances.
  1. Add Teleport Suite (macOS) from Fleet-maintained apps to a fleet and install it on a macOS host.
  2. Uninstall it from the host's Software tab.
  3. On the host, run pkgutil --pkgs | grep -i teleport: the tsh and tctl receipts are still listed.

🕯️ More info (optional)

ee/maintained-apps/inputs/homebrew/scripts/teleport-suite-uninstall.sh: expand_pkgid_and_map only converts (.*) to a regex inside the if [[ "$PKGID" == *"*" ]] branch (line 10), i.e. only for IDs ending in *. The (.*).com.gravitational.teleport.tctl / .tsh IDs (lines 177–180) don't end in *, so they fall through to the literal branch. Present since the app was added in #36413; Teleport Suite is the only app in outputs/ using a (.*) ID. Seen on Teleport Suite 18.11.10, macOS 27.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    #g-auto-patchingProduct group focused on auto patching softwarebugSomething isn't working as documented~released bugThis bug was found in a stable release.

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions