CleanMate

All guides · macOS and Ubuntu · Updated

Startup apps and login items on Mac and Ubuntu: how to see, disable and remove what runs when you log in

Where apps register themselves to start at login on a Mac (Login Items, LaunchAgents) and on Ubuntu (autostart, systemd user services), the commands to list, disable and remove them, and how CleanMate does it.

Download for macOS · Install on Ubuntu — free and open source

CleanMate Login Items on a Mac, listing launch agents with their app and stateCleanMate Login Items on a Mac, listing launch agents with their app and state

Many apps start themselves when you log in: updaters, sync clients, helpers for apps you rarely open. Each one costs memory and slows the login a little. Some stay after the app is removed, and then try to start a program that is not there.

On a Mac

There are two places.

Login Items in System Settings › General › Login Items & Extensions. The Open at Login list holds apps that open as windows; remove one with the – button. The Allow in the Background list holds helpers; switch one off with its toggle.

LaunchAgents: property list (.plist) files that tell launchd to start a program. Yours are in ~/Library/LaunchAgents; the ones for every user are in /Library/LaunchAgents (changing them needs an administrator password); Apple’s own are in /System/Library/LaunchAgents and are not to be touched.

# What is there
ls ~/Library/LaunchAgents /Library/LaunchAgents

# What is loaded now
launchctl list | grep -v com.apple

# Stop one from starting (the file stays)
launchctl disable gui/$(id -u)/<label>
launchctl bootout gui/$(id -u)/<label>

# Turn it back on
launchctl enable gui/$(id -u)/<label>
launchctl bootstrap gui/$(id -u) ~/Library/LaunchAgents/<label>.plist

The label is the Label key inside the plist (plutil -p <file> shows it), usually the same as the file name. To remove an agent for good, stop it, then move its plist to the Trash. An app you still use may put it back on its next start: switch it off in that app’s settings instead.

On Ubuntu

Also two places.

Autostart entries: .desktop files in ~/.config/autostart (yours) and /etc/xdg/autostart (for every user, installed by packages). GNOME’s Startup Applications app (or Settings › Apps on newer Ubuntu) shows them.

ls ~/.config/autostart /etc/xdg/autostart

To disable an entry from /etc/xdg/autostart for yourself only, copy it to ~/.config/autostart and add Hidden=true. Your own entries can be deleted, or switched off with X-GNOME-Autostart-enabled=false.

systemd user services: programs started by your own systemd instance at login.

systemctl --user list-unit-files --state=enabled
systemctl --user disable --now <name>.service   # stop it and don't start it at login
systemctl --user enable --now <name>.service    # back on

Services from packages are in /usr/lib/systemd/user; yours are in ~/.config/systemd/user.

How CleanMate does it

On a Mac (all macOS features), Login Items lists your launch agents (~/Library/LaunchAgents) with the app they belong to and their state. You can disable, enable or remove one; removing moves its plist to the Trash. CleanMate reads the plist’s label again right before it acts, and refuses if it changed or another plist uses the same label, so it never touches another service. Third-party agents and daemons in /Library/LaunchAgents and /Library/LaunchDaemons are listed too, with App Removed on one whose app is gone: Remove… has Finder move the plist to the Trash after one administrator password prompt, and it stops starting after a restart. Apple’s are left out. The Open at Login list in System Settings is not managed by CleanMate.

On Ubuntu (all Ubuntu features), Startup Items switches the apps and your systemd user services that start at login on or off; a service or timer also starts or stops right away. The system’s own services are only shown. Removing one of yours moves its file to the Trash, with Undo. Entries whose program is gone, left behind by an app you removed, are listed first as broken, ready to remove. It is in the desktop app and in the terminal app (cm), where t moves a broken entry to the Trash. The startup items page explains how to manage login agents and background services on Mac and Ubuntu.

To remove an app with the files it leaves behind, see uninstall apps completely. For what your browsers keep, see browser cache, history and cookies.

FAQ

Is it safe to disable a login item? Yes. The app still works when you open it; it only stops starting by itself. Updaters and sync clients run when you open their app.

Why does a removed app still show in Login Items? Its launch agent or autostart file stayed behind. Remove that file; CleanMate on Ubuntu lists these as broken.

Should I remove the agents in /Library/LaunchAgents? Only for an app you have removed. They belong to apps installed for every user, such as VPN or security software, and changing them needs an administrator password.

Looking for a free BuhoCleaner alternative? See how CleanMate compares, feature by feature.

Skip the commands

CleanMate runs on both systems: pick yours.

Open source — star it on GitHub: CleanMate for macOS · CleanMate for Ubuntu

How CleanMate decides what is safe to remove →