Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions ee/maintained-apps/outputs/beeper/darwin.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"versions": [
{
"version": "4.2.998",
"version": "4.2.1004",
"queries": {
"exists": "SELECT 1 FROM apps WHERE bundle_identifier = 'com.automattic.beeper.desktop';",
"patched": "SELECT 1 WHERE NOT EXISTS (SELECT 1 FROM apps WHERE bundle_identifier = 'com.automattic.beeper.desktop' AND version_compare(bundle_short_version, '4.2.998') < 0);"
"patched": "SELECT 1 WHERE NOT EXISTS (SELECT 1 FROM apps WHERE bundle_identifier = 'com.automattic.beeper.desktop' AND version_compare(bundle_short_version, '4.2.1004') < 0);"
},
"installer_url": "https://beeper-desktop.download.beeper.com/builds/Beeper-4.2.998-arm64-mac.zip",
"installer_url": "https://beeper-desktop.download.beeper.com/builds/Beeper-4.2.1004-arm64-mac.zip",
"install_script_ref": "a73050ea",
"uninstall_script_ref": "978d30f8",
"sha256": "012dbe602bf518d7d75dfe8056750b0831e531c3552f1158cbe695e1e77912b9",
"sha256": "bbecfa9a46ee70de944131f0751b4c4d22c2887408fea6c5f8509df55a6e7ea4",
"default_categories": [
"Communication"
]
Expand Down
8 changes: 4 additions & 4 deletions ee/maintained-apps/outputs/chatgpt/darwin.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"versions": [
{
"version": "26.715.72359",
"version": "26.721.30844",
"queries": {
"exists": "SELECT 1 FROM apps WHERE bundle_identifier = 'com.openai.chat';",
"patched": "SELECT 1 WHERE NOT EXISTS (SELECT 1 FROM apps WHERE bundle_identifier = 'com.openai.chat' AND version_compare(bundle_short_version, '26.715.72359') < 0);"
"patched": "SELECT 1 WHERE NOT EXISTS (SELECT 1 FROM apps WHERE bundle_identifier = 'com.openai.chat' AND version_compare(bundle_short_version, '26.721.30844') < 0);"
},
"installer_url": "https://persistent.oaistatic.com/codex-app-prod/ChatGPT-darwin-arm64-26.715.72359.zip",
"installer_url": "https://persistent.oaistatic.com/codex-app-prod/ChatGPT-darwin-arm64-26.721.30844.zip",
"install_script_ref": "6872008e",
"uninstall_script_ref": "678e6cf0",
"sha256": "bb599bc22331bebb6ca85e8e9493433a495d44f461efcede3e7054f326b047ef",
"sha256": "295db7bfd46fce3f78c4fbd5dc9ded61ef3648fc2df86baaa13015bb21277b9b",
"default_categories": [
"Productivity"
]
Expand Down
8 changes: 4 additions & 4 deletions ee/maintained-apps/outputs/freecad/windows.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"versions": [
{
"version": "1.1.1",
"version": "1.1.2",
"queries": {
"exists": "SELECT 1 FROM programs WHERE name LIKE 'FreeCAD%' AND publisher = 'FreeCAD Team';",
"patched": "SELECT 1 WHERE NOT EXISTS (SELECT 1 FROM programs WHERE name LIKE 'FreeCAD%' AND publisher = 'FreeCAD Team' AND version_compare(version, '1.1.1') < 0);"
"patched": "SELECT 1 WHERE NOT EXISTS (SELECT 1 FROM programs WHERE name LIKE 'FreeCAD%' AND publisher = 'FreeCAD Team' AND version_compare(version, '1.1.2') < 0);"
},
"installer_url": "https://github.com/FreeCAD/FreeCAD/releases/download/1.1.1/FreeCAD_1.1.1-Windows-x86_64-py311-installer.exe",
"installer_url": "https://github.com/FreeCAD/FreeCAD/releases/download/1.1.2/FreeCAD_1.1.2-Windows-x86_64-py311-installer.exe",
"install_script_ref": "1cf2c1f5",
"uninstall_script_ref": "6baebf4c",
"sha256": "3e4caf58cc1d82e4e8d726572f741ae664b6e91a77c4d3cb59102d9b8bd51feb",
"sha256": "a5d9d829c10a6074620dc4ca52ca13e71d87d866e0caf4b737172ffb4f94bec9",
"default_categories": [
"Productivity"
]
Expand Down
8 changes: 4 additions & 4 deletions ee/maintained-apps/outputs/kiro-cli/darwin.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"versions": [
{
"version": "2.14.0",
"version": "2.14.1",
"queries": {
"exists": "SELECT 1 FROM apps WHERE bundle_identifier = 'dev.kiro.cli';",
"patched": "SELECT 1 WHERE NOT EXISTS (SELECT 1 FROM apps WHERE bundle_identifier = 'dev.kiro.cli' AND version_compare(bundle_short_version, '2.14.0') < 0);"
"patched": "SELECT 1 WHERE NOT EXISTS (SELECT 1 FROM apps WHERE bundle_identifier = 'dev.kiro.cli' AND version_compare(bundle_short_version, '2.14.1') < 0);"
},
"installer_url": "https://desktop-release.q.us-east-1.amazonaws.com/2.14.0/Kiro%20CLI.dmg",
"installer_url": "https://desktop-release.q.us-east-1.amazonaws.com/2.14.1/Kiro%20CLI.dmg",
"install_script_ref": "7bf3d706",
"uninstall_script_ref": "ed98f0de",
"sha256": "e9ec002e4d553ac546fda8ba306f2b0ae3c3abe6ca25faedf238f69f52086ee3",
"sha256": "3c22147f5e297fb03b13bd61870c449b2cfe21818fb6718c89eede3263f15426",
"default_categories": [
"Productivity"
]
Expand Down
12 changes: 6 additions & 6 deletions ee/maintained-apps/outputs/ollama/darwin.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
{
"versions": [
{
"version": "0.32.1",
"version": "0.32.3",
"queries": {
"exists": "SELECT 1 FROM apps WHERE bundle_identifier = 'com.electron.ollama';",
"patched": "SELECT 1 WHERE NOT EXISTS (SELECT 1 FROM apps WHERE bundle_identifier = 'com.electron.ollama' AND version_compare(bundle_short_version, '0.32.1') < 0);"
"patched": "SELECT 1 WHERE NOT EXISTS (SELECT 1 FROM apps WHERE bundle_identifier = 'com.electron.ollama' AND version_compare(bundle_short_version, '0.32.3') < 0);"
},
"installer_url": "https://github.com/ollama/ollama/releases/download/v0.32.1/Ollama-darwin.zip",
"installer_url": "https://github.com/ollama/ollama/releases/download/v0.32.3/Ollama-darwin.zip",
"install_script_ref": "9f174559",
"uninstall_script_ref": "bf40e2d5",
"sha256": "301f87ed99822ed4d5c48ab4173c52457c09ccf25397d6a1d6cfde330444f1a8",
"uninstall_script_ref": "ecec947d",
"sha256": "3be39ebba6e7beee0e6498468dd391771db56e8fff84d77424fccc8bd94ccbfa",
"default_categories": [
"Developer tools"
]
}
],
"refs": {
"9f174559": "#!/bin/bash\n\n# variables\nAPPDIR=\"/Applications/\"\nTMPDIR=$(dirname \"$(realpath \"$INSTALLER_PATH\")\")\n# functions\n\nquit_and_track_application() {\n local bundle_id=\"$1\"\n local var_name=\"APP_WAS_RUNNING_$(echo \"$bundle_id\" | tr '.-' '__')\"\n local timeout_duration=10\n\n # check if the application is running\n local app_running\n app_running=$(osascript -e \"application id \\\"$bundle_id\\\" is running\" 2>/dev/null)\n if [[ \"$app_running\" != \"true\" ]]; then\n eval \"export $var_name=0\"\n return\n fi\n\n local console_user\n console_user=$(stat -f \"%Su\" /dev/console)\n if [[ -z \"$console_user\" || \"$console_user\" == \"root\" || \"$console_user\" == \"loginwindow\" ]]; then\n echo \"Not logged into a non-root GUI; skipping quitting application ID '$bundle_id'.\"\n eval \"export $var_name=0\"\n return\n fi\n\n # App was running, mark it for relaunch\n eval \"export $var_name=1\"\n echo \"Application '$bundle_id' was running; will relaunch after installation.\"\n\n echo \"Quitting application '$bundle_id'...\"\n\n # try to quit the application within the timeout period\n local quit_success=false\n SECONDS=0\n while (( SECONDS < timeout_duration )); do\n if osascript -e \"tell application id \\\"$bundle_id\\\" to quit\" >/dev/null 2>&1; then\n if ! pgrep -f \"$bundle_id\" >/dev/null 2>&1; then\n echo \"Application '$bundle_id' quit successfully.\"\n quit_success=true\n break\n fi\n fi\n sleep 1\n done\n\n if [[ \"$quit_success\" = false ]]; then\n echo \"Application '$bundle_id' did not quit.\"\n fi\n}\n\n\nrelaunch_application() {\n local bundle_id=\"$1\"\n local var_name=\"APP_WAS_RUNNING_$(echo \"$bundle_id\" | tr '.-' '__')\"\n local was_running\n\n # Check if the app was running before installation\n eval \"was_running=\\$$var_name\"\n if [[ \"$was_running\" != \"1\" ]]; then\n return\n fi\n\n local console_user\n console_user=$(stat -f \"%Su\" /dev/console)\n if [[ -z \"$console_user\" || \"$console_user\" == \"root\" || \"$console_user\" == \"loginwindow\" ]]; then\n echo \"Not logged into a non-root GUI; skipping relaunching application ID '$bundle_id'.\"\n return\n fi\n\n echo \"Relaunching application '$bundle_id'...\"\n\n # Launch the app in the logged-in user's GUI session. Apps launched by root\n # won't register with the user's Dock/GUI, so run 'open' as the console user.\n # Use 'launchctl asuser' to bootstrap into the console user's Mach namespace\n # and GUI session — 'sudo -u' alone doesn't do this, which can cause\n # LSOpenURLsWithRole() failures even when 'open' exits 0.\n local open_status=0\n if [[ $EUID -eq 0 ]]; then\n local console_uid\n console_uid=$(id -u \"$console_user\")\n /bin/launchctl asuser \"$console_uid\" sudo -u \"$console_user\" open -b \"$bundle_id\" >/dev/null 2>&1 || open_status=$?\n else\n open -b \"$bundle_id\" >/dev/null 2>&1 || open_status=$?\n fi\n\n if [[ $open_status -eq 0 ]]; then\n echo \"Application '$bundle_id' relaunched successfully.\"\n else\n echo \"Failed to relaunch application '$bundle_id'.\"\n fi\n}\n\n\n# extract contents\nunzip \"$INSTALLER_PATH\" -d \"$TMPDIR\"\n# copy to the applications folder\nquit_and_track_application 'com.electron.ollama'\nif [ -d \"$APPDIR/Ollama.app\" ]; then\n\tsudo mv \"$APPDIR/Ollama.app\" \"$TMPDIR/Ollama.app.bkp\"\nfi\nsudo cp -R \"$TMPDIR/Ollama.app\" \"$APPDIR\"\nrelaunch_application 'com.electron.ollama'\n",
"bf40e2d5": "#!/bin/bash\n\n# variables\nAPPDIR=\"/Applications/\"\nLOGGED_IN_USER=$(scutil <<< \"show State:/Users/ConsoleUser\" | awk '/Name :/ { print $3 }')\n# functions\n\ntrash() {\n local logged_in_user=\"$1\"\n local target_file=\"$2\"\n local timestamp=\"$(date +%Y-%m-%d-%s)\"\n local rand=\"$(jot -r 1 0 99999)\"\n\n # replace ~ with /Users/$logged_in_user\n if [[ \"$target_file\" == ~* ]]; then\n target_file=\"/Users/$logged_in_user${target_file:1}\"\n fi\n\n local trash=\"/Users/$logged_in_user/.Trash\"\n\n # If the target contains glob characters, expand it and move each match.\n if [[ \"$target_file\" == *[*?[]* ]]; then\n local file file_name\n local matched=false\n local i=0\n # compgen -G expands the (quoted) pattern itself, so paths containing\n # spaces glob correctly; reading line by line keeps each match intact.\n while IFS= read -r file; do\n [[ -n \"$file\" ]] || continue\n [[ -e \"$file\" || -L \"$file\" ]] || continue\n matched=true\n i=$((i + 1))\n file_name=\"$(basename \"$file\")\"\n echo \"removing $file.\"\n # The per-match counter keeps matches that share a basename from\n # overwriting each other in the trash.\n mv -f \"$file\" \"$trash/${file_name}_${timestamp}_${rand}_${i}\"\n done < <(compgen -G \"$target_file\" 2>/dev/null)\n if [[ \"$matched\" == false ]]; then\n echo \"$target_file doesn't exist.\"\n fi\n return\n fi\n\n local file_name=\"$(basename \"${target_file}\")\"\n\n if [[ -e \"$target_file\" ]]; then\n echo \"removing $target_file.\"\n mv -f \"$target_file\" \"$trash/${file_name}_${timestamp}_${rand}\"\n else\n echo \"$target_file doesn't exist.\"\n fi\n}\n\nsudo rm -rf \"$APPDIR/Ollama.app\"\ntrash $LOGGED_IN_USER '~/.ollama'\ntrash $LOGGED_IN_USER '~/Library/Application Support/Ollama'\ntrash $LOGGED_IN_USER '~/Library/Caches/com.electron.ollama'\ntrash $LOGGED_IN_USER '~/Library/Preferences/com.electron.ollama.plist'\ntrash $LOGGED_IN_USER '~/Library/Saved Application State/com.electron.ollama.savedState'\ntrash $LOGGED_IN_USER '~/Library/Webkit/com.electron.ollama'\n"
"ecec947d": "#!/bin/bash\n\n# variables\nAPPDIR=\"/Applications/\"\nLOGGED_IN_USER=$(scutil <<< \"show State:/Users/ConsoleUser\" | awk '/Name :/ { print $3 }')\n# functions\n\nquit_application() {\n local bundle_id=\"$1\"\n local timeout_duration=10\n\n # check if the application is running\n local app_running\n app_running=$(osascript -e \"application id \\\"$bundle_id\\\" is running\" 2>/dev/null)\n if [[ \"$app_running\" != \"true\" ]]; then\n return\n fi\n\n local console_user\n console_user=$(stat -f \"%Su\" /dev/console)\n if [[ -z \"$console_user\" || \"$console_user\" == \"root\" || \"$console_user\" == \"loginwindow\" ]]; then\n echo \"Not logged into a non-root GUI; skipping quitting application ID '$bundle_id'.\"\n return\n fi\n\n echo \"Quitting application '$bundle_id'...\"\n\n # try to quit the application within the timeout period\n local quit_success=false\n SECONDS=0\n while (( SECONDS < timeout_duration )); do\n if osascript -e \"tell application id \\\"$bundle_id\\\" to quit\" >/dev/null 2>&1; then\n if ! pgrep -f \"$bundle_id\" >/dev/null 2>&1; then\n echo \"Application '$bundle_id' quit successfully.\"\n quit_success=true\n break\n fi\n fi\n sleep 1\n done\n\n if [[ \"$quit_success\" = false ]]; then\n echo \"Application '$bundle_id' did not quit.\"\n fi\n}\n\n\nremove_launchctl_service() {\n local service=\"$1\"\n local booleans=(\"true\" \"false\")\n local plist_status\n local paths\n local should_sudo\n\n echo \"Removing launchctl service ${service}\"\n\n # A wildcard label can't be used with launchctl or as a plist name, so expand\n # it to the labels of currently loaded services that match the pattern.\n local services=(\"$service\")\n if [[ \"$service\" == *\"*\"* ]]; then\n local regex\n # Escape regex metacharacters, turn '*' into '.*', and anchor the pattern so\n # it matches a full label rather than a substring.\n regex=$(printf '%s' \"$service\" | sed -e 's/[][(){}.^$+?|\\\\]/\\\\&/g' -e 's/\\*/.*/g')\n regex=\"^${regex}$\"\n services=()\n local id\n # Match every loaded job by label regardless of PID; launchctl list reports\n # loaded-but-not-running jobs with a \"-\" in the PID column.\n while read -r _ _ id; do\n [[ \"$id\" =~ $regex ]] && services+=(\"$id\")\n done < <(launchctl list 2>/dev/null | tail -n +2)\n if [[ ${#services[@]} -eq 0 ]]; then\n echo \"No loaded launchctl service matches ${service}\"\n return\n fi\n fi\n\n local service_label\n for service_label in \"${services[@]}\"; do\n for should_sudo in \"${booleans[@]}\"; do\n plist_status=$(launchctl list \"${service_label}\" 2>/dev/null)\n\n if [[ $plist_status == \\{* ]]; then\n if [[ $should_sudo == \"true\" ]]; then\n sudo launchctl remove \"${service_label}\"\n else\n launchctl remove \"${service_label}\"\n fi\n sleep 1\n fi\n\n paths=(\n \"/Library/LaunchAgents/${service_label}.plist\"\n \"/Library/LaunchDaemons/${service_label}.plist\"\n )\n\n # if not using sudo, prepend the home directory to the paths\n if [[ $should_sudo == \"false\" ]]; then\n for i in \"${!paths[@]}\"; do\n paths[i]=\"${HOME}${paths[i]}\"\n done\n fi\n\n for path in \"${paths[@]}\"; do\n if [[ -e \"$path\" ]]; then\n if [[ $should_sudo == \"true\" ]]; then\n sudo rm -f -- \"$path\"\n else\n rm -f -- \"$path\"\n fi\n fi\n done\n done\n done\n}\n\ntrash() {\n local logged_in_user=\"$1\"\n local target_file=\"$2\"\n local timestamp=\"$(date +%Y-%m-%d-%s)\"\n local rand=\"$(jot -r 1 0 99999)\"\n\n # replace ~ with /Users/$logged_in_user\n if [[ \"$target_file\" == ~* ]]; then\n target_file=\"/Users/$logged_in_user${target_file:1}\"\n fi\n\n local trash=\"/Users/$logged_in_user/.Trash\"\n\n # If the target contains glob characters, expand it and move each match.\n if [[ \"$target_file\" == *[*?[]* ]]; then\n local file file_name\n local matched=false\n local i=0\n # compgen -G expands the (quoted) pattern itself, so paths containing\n # spaces glob correctly; reading line by line keeps each match intact.\n while IFS= read -r file; do\n [[ -n \"$file\" ]] || continue\n [[ -e \"$file\" || -L \"$file\" ]] || continue\n matched=true\n i=$((i + 1))\n file_name=\"$(basename \"$file\")\"\n echo \"removing $file.\"\n # The per-match counter keeps matches that share a basename from\n # overwriting each other in the trash.\n mv -f \"$file\" \"$trash/${file_name}_${timestamp}_${rand}_${i}\"\n done < <(compgen -G \"$target_file\" 2>/dev/null)\n if [[ \"$matched\" == false ]]; then\n echo \"$target_file doesn't exist.\"\n fi\n return\n fi\n\n local file_name=\"$(basename \"${target_file}\")\"\n\n if [[ -e \"$target_file\" ]]; then\n echo \"removing $target_file.\"\n mv -f \"$target_file\" \"$trash/${file_name}_${timestamp}_${rand}\"\n else\n echo \"$target_file doesn't exist.\"\n fi\n}\n\nremove_launchctl_service 'com.ollama.ollama'\nquit_application 'com.electron.ollama'\nsudo rm -rf \"$APPDIR/Ollama.app\"\ntrash $LOGGED_IN_USER '~/.ollama'\ntrash $LOGGED_IN_USER '~/Library/Application Support/Ollama'\ntrash $LOGGED_IN_USER '~/Library/Caches/com.electron.ollama'\ntrash $LOGGED_IN_USER '~/Library/Preferences/com.electron.ollama.plist'\ntrash $LOGGED_IN_USER '~/Library/Saved Application State/com.electron.ollama.savedState'\ntrash $LOGGED_IN_USER '~/Library/Webkit/com.electron.ollama'\n"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== file excerpt =="
fd -a 'darwin\.json$' ee/maintained-apps/outputs/ollama 2>/dev/null | sed 's#^\./##'
if [ -f "ee/maintained-apps/outputs/ollama/darwin.json" ]; then
  sed -n '1,120p' "ee/maintained-apps/outputs/ollama/darwin.json"
fi

echo "== nearby maintained-app outputs/ollama =="
fd -a . ee/maintained-apps/outputs/ollama 2>/dev/null | sed 's#^\./##' | head -50

echo "== references to Ollama uninstall scripts / launchd removal =="
rg -n "remove_launchctl_service|com\.ollama\.ollama|OLLAMA|i=0|trash\\$LOGGED_IN_USER|LOGGED_IN_USER" ee || true

Repository: fleetdm/fleet

Length of output: 10454


🏁 Script executed:

#!/bin/bash
set -u

echo "== exact Ollama uninstall/remove_launchctl_service occurrences =="
rg -n "remove_launchctl_service|com\.ollama\.ollama|launchctl asuser|asuser|\/Users\/\$LOGGED_IN_USER|~/Library/LaunchAgents|Library/LaunchAgents" ee || true

echo "== git log/status summary =="
git status --short || true
git log --oneline -20 || true

echo "== compare uninstall function behavior with console user vs root context =="
python3 - <<'PY'
from pathlib import Path
import re
p = Path('ee/maintained-apps/outputs/ollama/darwin.json')
text = p.read_text().splitlines()[37:228]
s = '\n'.join(text)
for name in ['LOGGED_IN_USER=$(scutil <<< "show State:/Users/ConsoleUser" | awk "/Name :/ { print $3 }")','remove_launchctl_service','launchctl list','sudo launchctl remove','launchctl remove','/Users/$LOGGED_IN_USER','~/Library/LaunchAgents','/Library/LaunchAgents','/Library/LaunchDaemons']:
    print(f"{name!r}: ", 'YES' if name in s else 'NO')
print()
print('contains launchctl asuser:', 'asuser' in s)
print('matches /Users/$LOGGED_IN_USER in trash paths:', bool(re.search(r'"/Users/\$LOGGED_IN_USER', s)))
PY

Repository: fleetdm/fleet

Length of output: 2374


🌐 Web query:

Apple launchmacos launchctl remove user launch agent session launchd domains asuser

💡 Result:

To remove or stop a user launch agent in modern macOS, the recommended approach is to use the launchctl bootout subcommand rather than the legacy remove command [1][2]. Because launch agents run within specific user-session domains (such as gui/), you must target the correct domain to manage them [3][4]. Key Concepts and Commands The legacy launchctl remove command is largely deprecated in favor of more explicit, domain-aware subcommands [1][2]. Modern launchctl syntax uses bootout to stop and unload services [5][2]. 1. Identify the Target Domain User agents typically run in the gui/ domain (where is the numeric User ID, e.g., 501) [3][4]. You can verify the UID of a logged-in user using the id -u command. 2. Bootout (Stop and Unload) To stop and remove a service from the launchd domain, use: launchctl bootout gui// Example: sudo launchctl bootout gui/501/com.example.myagent 3. Managing Contexts with asuser If you need to execute launchctl commands as if you were the target user (e.g., to manage their agents from a root-level script), you can use the asuser subcommand [6][7]. This executes a command in the specified user's Mach bootstrap context [6][8]. Example to unload an agent as a specific user: sudo launchctl asuser 501 launchctl bootout gui/501/com.example.myagent Important Considerations Service Identifiers: The is the label defined within the service's.plist file (e.g., com.example.myagent), not the filename of the.plist itself [3][5]. Persistence: Using bootout only stops the service until the next login or reboot [5]. If the.plist file remains in ~/Library/LaunchAgents or /Library/LaunchAgents, the agent may be reloaded automatically [9][10]. To prevent this, you should also remove or move the.plist file from these directories [11][2]. Disabling: If you wish to prevent a service from launching without deleting the.plist, you can use the disable subcommand [2][4]: sudo launchctl disable gui/501/com.example.myagent For most administrative tasks, targeting the gui// domain directly as root is the standard method for managing agents across user sessions [4].

Citations:


🌐 Web query:

macOS launchctl list without arguments lists current launchd domain user agent

💡 Result:

Yes, running launchctl list without arguments in a terminal session typically lists the jobs loaded into the launchd domain associated with the user's current context [1][2][3]. When executed by a non-privileged user, launchctl list interacts with the per-user launchd session (the user agent domain) [1][2][3]. If you execute the command with sudo (as root), it interacts with the system-wide launchd domain (the launch daemon domain) [1][3]. Because launchctl list is considered a legacy command, it implicitly determines the target domain based on the user ID of the process running the command, rather than requiring explicit domain arguments like the modern print subcommand [1][2]. The output of launchctl list displays three columns: 1. The process ID (PID) of the job, or "-" if the job is not currently running [4][5][6]. 2. The last exit status of the job (a negative number indicates the signal that stopped it) [4][7][6]. 3. The job's label [4][6]. For more granular control and modern diagnostic capabilities, official documentation and technical guidance recommend using the launchctl print subcommand, which allows you to explicitly specify the domain (e.g., system or user/) [4][5][2][3].

Citations:


Target the logged-in user when removing the Ollama launch service.

remove_launchctl_service runs launchctl in the current process context and uses $HOME, so if Fleet runs this as root it can check root’s launchd domain and /var/root/Library/... instead of the console user’s gui/<uid> domain and per-user LaunchAgents path. Resolve the console UID and use that user’s launchd domain/home, then remove any remaining plist.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@ee/maintained-apps/outputs/ollama/darwin.json` at line 20, Update
remove_launchctl_service to resolve the console user’s UID and home directory,
then run launchctl queries/removals against that user’s gui/<uid> domain instead
of the current process context. Use the console user’s home when constructing
per-user LaunchAgents paths, while preserving sudo handling for system services,
and remove any matching plist after unloading the service.

}
}
Loading
Loading