List and Remove Login Items with osascript
osascript talks to System Events to list every login item and delete the unwanted ones by name.
Run `osascript -e 'tell application "System Events" to get the name of every login item'`, then a delete command per app.
01Command
Command
$ osascript -e 'tell application "System Events" to get the name of every login item'02What it does
Login items are the apps that silently launch every time you sign in, and they are the usual suspects behind slow logins. The get command prints their names; the delete command removes one by exact name, equivalent to unchecking it in System Settings > General > Login Items. This governs classic login items — helper agents installed as launchd daemons live elsewhere and keep running regardless. Deleting here does not uninstall the app; it just stops it from auto-starting, and it can be re-added from System Settings later.
03Risk
04Undo
Undo
$ osascript -e 'tell application "System Events" to delete login item "App Name"'05Sources
- osascript — execute AppleScript and JavaScript (macOS man page)Evidence: Documents running AppleScript from the shell; System Events' login items class manages startup items.
Last verified: 2026-09-18 · Category: System & Settings