How to end a background process on a Mac

A background process has no window, no Dock icon and no Quit menu, so the usual ways of closing an app do not reach it. To end one you need a tool that lists processes and can send them a stop request. In Foreman, open the Processes page, find the row under Background processes and click End Task. In Terminal, find the process ID and run kill with it. Before you do either, check what the process is, because many of them come straight back and a few should never be touched.

What a background process is

Your Mac runs hundreds of programs you never see. Some belong to apps you have open: a browser runs separate processes for its tabs, and many chat and video apps run helpers of their own. Some belong to macOS and do a single job, such as reading new files for Spotlight search, syncing iCloud Drive or checking for updates. Some are installed by apps you have used before, such as a sync tool or an updater, and keep running after you close the app.

None of these have a window, which is why you cannot quit them with Command-Q. You will not find them in the Force Quit window you open with Option-Command-Escape either, because that window lists apps, not background programs.

Ask first: do you need to end it?

Ending a background process is worth doing only if it is causing a problem you can see, such as a high CPU figure that has lasted a long time or a fan that will not settle. Many processes are busy for a short while and then quiet down on their own. A busy Spotlight file reader after a big file copy or a macOS update, for example, is normal and settles once the work is done.

If the figure is high only for a few minutes, wait. If it is high for hours, find out what the process is. How to find out what’s running in the background on your Mac shows you how to see what is running and what the usual names mean.

How to end a background process with Foreman

  1. Press Control-Shift-Escape to open Foreman from any app, or click its readout in the menu bar and choose Open Foreman.
  2. Stay on the Processes page. Foreman splits it into Apps, Background processes and System processes. Your target is usually under Background processes or System processes.
  3. Use the search field, “Search by name or PID”, if the list is long. Foreman shows plain-English names with the real name beside them in grey, so “Spotlight indexing” has mds_stores next to it.
  4. Copies of one background program share a row with a count, such as “Spotlight file reader (4)”. Open the row to see each copy.
  5. Select the row and click End Task, or right-click it. For a program that is not an app, the Process menu reads End instead of Quit.

End Task asks the program to stop. If it does not, ending it again forces it. When a process needs an administrator password to end, Foreman asks for it first.

If you want the process to stay stopped, ending it is not enough, and the next section explains why.

Which ones macOS restarts by itself

Most of macOS’s background processes are started by launchd, the program macOS uses to start and stop every other process. Foreman describes it as the Service launcher. Some are set to be kept running, so launchd starts them again as soon as they end. Others are started again the next time something needs them. Either way, the Spotlight file reader you end is likely to be back before long, with a new process ID.

That is not a failure. It is macOS doing what it was designed to do. Three things follow:

  • Ending a process is a nudge, not a permanent fix. It can break a stuck run and let the next one start clean, which is a fair reason to do it. It does not stop the job from ever running again.
  • Do not end things in a loop. If a process comes back and is stuck again, ending it ten times will not help. Look for the cause: an app that is feeding it work, a disk that is full, an update that is still running.
  • Items an app installed can be stopped for good. If an app put a background item on your Mac, you can turn it off. Foreman’s Startup Apps page lists login items, launch agents and daemons, and background items, grouped by the app they belong to, and you can Disable one. In System Settings, General > Login Items & Extensions (Login Items on macOS 14) has switches for many of the same items under Allow in the Background. How to stop apps opening at login on a Mac walks through it.

Foreman’s Services page lists the macOS background services you and the system run, and you can Start, Stop or Restart them. A service you stop is not a service removed, and system services need an administrator password.

Which ones need a password

macOS only lets an administrator end a process owned by root, by a system account (names that start with an underscore) or by another user. This is the Mac protecting itself. The User column shows who owns a process. Foreman asks for the password before it tries, so you are not left guessing why nothing happened. Your own apps and their helpers end without one.

Be careful with the password prompt on system processes. It is a reason to stop and check what the process is, not to type the password and see what happens.

Which ones to never end

Foreman never offers to end kernel_task or launchd. These two are the core of macOS, and ending either would take the whole Mac down with it. Foreman describes kernel_task as the core of macOS, where high CPU often means the Mac is slowing itself down to stay cool, so it is a sign of heat, not a program to stop. What is kernel_task on a Mac, and why does it use so much CPU? explains this.

Other processes will let you try, but ending them has a cost:

  • WindowServer draws every window and everything else on screen. Ending it logs you out and you lose unsaved work.
  • loginwindow runs your login session. Ending it logs you out too.
  • Dock, Finder, SystemUIServer and ControlCenter are the Dock, the desktop, and parts of the menu bar. macOS normally starts them again at once, but the screen flickers while it does.
  • securityd and tccd handle keychains and privacy permissions. Ending one can interrupt an app that is using it at that moment.

Before ending WindowServer or loginwindow, Foreman warns you what will happen, which is that you are logged out. Read the warning. If you were not trying to log out, cancel.

A good rule: if you cannot say in one sentence what a process does, do not end it. Search for the name first. Foreman’s Search Online item does a web search for the process name, and Foreman gives plain-English names to about 120 macOS processes.

Ending a background process in Terminal

If you prefer the command line, run ps or pgrep to find the process ID, then kill with that number. A plain kill asks the process to stop, and kill -9 forces it. How to kill a process from Terminal on a Mac, and when not to has the commands and the risks. It works, but nothing in Terminal warns you before you end something important, which is where a list with plain names helps.

The short version

  1. Check that the process is really the problem, and give it a few minutes.
  2. In Foreman, find it under Background processes and click End Task.
  3. Expect macOS to restart many of them. That is normal.
  4. To stop an app’s background item for good, disable it in Startup Apps or in System Settings.
  5. Never end kernel_task or launchd, and think twice before WindowServer or loginwindow.

Foreman costs $12 once, works on up to 3 Macs and is free for 24 hours, so you can look at what is running on your own Mac before you decide.