Tool · The caffeinate command (Terminal)

Why caffeinate keeps your Mac awake

caffeinate is the macOS command that keeps a Mac awake on purpose. In pmset -g assertions it appears as “caffeinate command-line tool”, and the assertion type tells you which flag was used: -i keeps the Mac awake, -d keeps the display on too, -s prevents system sleep on power. It stays until the command ends, its timeout runs out, or it’s stopped. Scripts and apps sometimes start it in the background.

Checked on macOS 27.2.1 on a MacBook Pro with Apple silicon, 11 November 2026.

Normal?Fine if you started it. If you didn’t, find out what did.
Keeps awakeDepends on the flag: the Mac, the display, or both.
Safe to quit?Yes. It’s an ordinary command; stopping it only lets the Mac sleep again.

What you’ll see

TypeNameMeaning
PreventUserIdleSystemSleepcaffeinate command-line toolcaffeinate -i: the Mac stays awake, the display can sleep.
PreventUserIdleDisplaySleepcaffeinate command-line toolcaffeinate -d: the display stays on.
PreventSystemSleepcaffeinate command-line toolcaffeinate -s: system sleep is prevented while on power.

Check it on your Mac

Open Terminal (in Applications › Utilities) and run:

caffeinate -i -t 4 & pmset -g assertions | grep -A2 caffeinate

Real output from the Mac we checked:

   pid 53282(caffeinate): [0x0000648f000193bb] 00:00:01 PreventUserIdleSystemSleep named: "caffeinate command-line tool"
	Details: caffeinate asserting for 4 secs
	Localized=THE CAFFEINATE TOOL IS PREVENTING SLEEP.

Activity Monitor shows the same thing without Terminal: open its Energy tab and look at the Preventing Sleep column.

What to do

  1. If it’s yours, go back to that Terminal window and press Control-C.
  2. If you don’t know where it came from, run ps -o pid,ppid,command -p $(pgrep caffeinate) to see its full command line and its parent process.
  3. To stop it, killall caffeinate. The script that started it may start it again.

See it without Terminal

SleepPilot, a menu bar app, lists every app that is keeping your Mac awake right now by name — audio through coreaudiod is shown under the app that plays it — and warns you when one holds the Mac awake for too long while nobody is using it. Each morning it can show what kept the Mac awake overnight.

SleepPilot’s menu bar panel listing Google Chrome (playing sound for 1 hour 12 minutes) and Time Machine (backing up) as keeping the Mac awake, with a notification that Chrome has kept the Mac awake for over an hour.

Questions

Is it safe to quit caffeinate?

Yes. It’s an ordinary command; stopping it only lets the Mac sleep again.

Is caffeinate keeping my Mac awake normal?

Fine if you started it. If you didn’t, find out what did.

Does caffeinate keep the display on?

Depends on the flag: the Mac, the display, or both.

Other things that keep a Mac awake

SleepPilot for Mac

Shows what keeps your Mac awake, and keeps it awake only when you want: until a command, a download or a backup is done.

Coming soon to the Mac App Store

macOS 14 Sonoma or later · Apple silicon and Intel