I am upgrading from mojave to big sur and need to know how to keep my mac awake during this time. the terminal command caffeinate did not work, after some time the screen display went blank as usual. Is there a way to prevent the mac from going to sleep? Also, If i went to System Preferences > Energy Saver > Battery and put "Turn Display Off After:" to never, will the update be able to override that when it needs to restart the computer after the update file has installed? Thank you in advance

  • I don't quite understand what you want to achieve. Do you want to install the update without a restart?
    – X_841
    Jan 23, 2021 at 9:54
  • 1
    Letting the screen go dim won’t affect things. Also, the download is incremental and accumulative, so it’s not clear what you’re struggling with - wrong syntax or terminal issues or just you’re worried about interruption?
    – bmike
    Jan 23, 2021 at 13:33

2 Answers 2


The easy way at the command line is to call software update.

softwareupdate --all --install --restart

The command prevents sleep, checks for all updates and then installs them. If the install requires a reboot, that happens immediately as well once the install is done.

  • need sudo and -R for restart from what i can see, but thank you for this
    – ng10
    May 30, 2022 at 6:43

There is a free app called Caffeine which prevents sleep on the mac, google search for it.

  • How does it improve on caffineate which either the app you mention calls or it uses that same API.
    – mmmmmm
    Feb 22, 2021 at 14:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .