Skip to content

Updates and uninstalling

The Oneleet Agent updates itself. There’s nothing to install after the first time.

The agent checks for an update every hour and installs it in the background. In the agent, Update available next to the version means an update is waiting. Click it to install the update now.

In the dashboard, a device’s Agent field shows Outdated when its agent is behind. Keep the device online with the agent connected, and it updates on its own.

An agent older than version 2.2.0 can’t update itself. Install the current version over it.

Uninstalling stops the agent from reporting, but the device stays in your workspace. If the device is leaving the company, ask an admin to delete it too.

On a Mac enrolled in Oneleet MDM, an admin can remove it from MDM with Also uninstall the Oneleet Agent ticked.

On any other Mac, quit the agent from its menu bar icon, then run:

Terminal window
sudo launchctl bootout system/oneleet-daemon
sudo rm -f /Library/LaunchDaemons/oneleet-daemon.plist
sudo rm -rf /Applications/Oneleet.app "/Library/Application Support/Oneleet Agent" /var/lib/oneleet /var/log/oneleet /opt/Oneleet
sudo rm -f /var/log/oneleet-daemon.out.log /var/log/oneleet-daemon.err.log /var/run/oneleet-daemon.sock

Moving the app to the Trash alone leaves the background service and its files behind.

To remove the agent from Macs with your own MDM, such as Jamf, Kandji or Mosyle, have it run this script as root. The script stops the agent, then removes the app, its background jobs, its installer receipts and its saved data. It exits with a non-zero code and names what’s left if launchd still runs the agent’s service, or if the app, one of its launchd jobs, its saved login or its data is still there afterwards, so your MDM reports the device as failed and can run it again.

#!/bin/bash
APP="/Applications/Oneleet.app"
DAEMON="$APP/Contents/Resources/oneleet-daemon"
# Stop and unregister the background service
if [ -x "$DAEMON" ]; then
"$DAEMON" stop
"$DAEMON" uninstall
fi
launchctl bootout system/oneleet-daemon 2>/dev/null
# Quit the app and anything else still running from it
pkill -f "$APP/" 2>/dev/null
sleep 2
# Keep the files while launchd still has the service, so a rerun can stop it
if launchctl print system/oneleet-daemon >/dev/null 2>&1; then
echo "Couldn't unload system/oneleet-daemon" >&2
exit 1
fi
# Remove the jobs left by agent updates
# A job that's still loaded keeps its plist, so a rerun can unload it
for plist in /Library/LaunchDaemons/com.oneleet.updater.*.plist /Library/LaunchDaemons/com.oneleet.uninstaller.*.plist; do
[ -e "$plist" ] || continue
job="system/$(basename "$plist" .plist)"
launchctl bootout "$job" 2>/dev/null
launchctl print "$job" >/dev/null 2>&1 || rm -f "$plist"
done
# Remove the app, its launchd job, installer receipts and saved data
rm -f /Library/LaunchDaemons/oneleet-daemon.plist
rm -rf "$APP"
for pkg in $(pkgutil --pkgs='com\.oneleet\..*' 2>/dev/null); do
pkgutil --forget "$pkg"
done
rm -rf "/Library/Application Support/Oneleet Agent" /var/lib/oneleet /var/log/oneleet /opt/Oneleet \
/var/run/oneleet /var/run/oneleet-daemon.sock /var/log/oneleet-daemon.out.log /var/log/oneleet-daemon.err.log
# Fail if the app, a launchd job, the saved login or the agent's data is still there
status=0
for path in "$APP" /Library/LaunchDaemons/oneleet-daemon.plist \
/Library/LaunchDaemons/com.oneleet.updater.*.plist /Library/LaunchDaemons/com.oneleet.uninstaller.*.plist \
"/Library/Application Support/Oneleet Agent" /var/lib/oneleet /var/log/oneleet; do
if [ -e "$path" ]; then
echo "Couldn't remove $path" >&2
status=1
fi
done
exit $status

You can run the script again after a partial uninstall. It removes whatever is left, and exits successfully once nothing is.

Uninstalling the agent doesn’t remove the device from Oneleet. Delete it from Devices afterwards, as described in Stop monitoring a device. If the Mac is enrolled in Oneleet MDM, remove it from MDM first, which can also uninstall the agent, then delete it.