Kill Processes by Pattern with pkill
Signal every process whose name matches a pattern in one command, with an optional custom signal.
01Command
$ pkill "<pattern>"02What it does
pkill combines pattern lookup and signalling in a single step: it finds every process whose name matches the pattern and sends each one the default TERM signal, so well-behaved apps exit cleanly. Pass a signal before the pattern (for example pkill -9 Safari) to send SIGKILL instead. Unlike killall, which matches exact process names, pkill matches partial names and regular expressions; the -f option widens matching to the entire command line.
03Risk
04Undo
✓No undo needed — this command does not change persistent state.
05Sources
- PKILL Command: Kill processes in macOSEvidence: The synopsis shows "pkill [- signal] [-ILafilnovx] ... pattern" and documents "-f Match against full argument lists. The default is to match against process names."
- pkill(1) man pageEvidence: The page documents the pkill synopsis with an optional signal and the -f flag ("Match against full argument lists. The default is to match against process names"), plus -I to request confirmation before signalling each process.
Last verified: 2026-09-19 · Category: System & Settings
06Related solutions
Point macOS screen captures at any folder you choose instead of the desktop.
Grab any file from the web straight into the current folder — no browser needed.
List the biggest files in your home folder that are eating disk space.