When you try to restart or shut down your Mac, is your computer getting stuck and your Mac will not shut down? Does your Finder Menu disappear and all your apps quit, BUT still your Mac get stuck on its Desktop and won’t shut down properly? Do you frequently unplug your Mac or remove the battery to get your computer to shut down and power off fully? Did all these problems occur after an OS, hardware, or application upgrade?
If so, you are not alone. For users that migrated from Windows PC to Mac, this problem may seem all too familiar. You try to switch off your Windows PC, and it doesn’t shut down or shuts down slowly. Unfortunately, issues with shutting down aren’t just for Windows PC owners! Sometimes our beautiful “it just works” Macs shows the same problem and won’t shut down.
For folks on the Windows platform, this issue is related to power issues, a faulty device driver or CMOS problems. For Windows PCs, this issue typically takes a while to troubleshoot. Fortunately, on Macs and MacBooks, most of these problems are solved by a quick two-step process.
If your Mac or MacBook won’t shut down when you use the > Shut Down from the Apple menu and the only way you close the machine down is to press the power button on your Mac, then perform both an SMC and an NVRAM reset to clear out the root problem.
Contents
Quick Tips
Try These Quick Tips To Shut Down Your Mac Properly
- Close all open apps, then try shutting down
- Reset both SMC and NVRAM
- Run Apple Diagnostics or Apple Hardware Test
- Perform a Safe Boot
- Use Some Terminal Commands (check below for specific commands)
Related Articles
- My Mac Won’t Start or Boot: How To Fix White Screen
- Factory Reset MacBooks & Macs
- MacBook Apps Crashing, How-To Fix
- Ten Things Every Mac Owner Should Know
Close All Open Apps
Apple requires that you Mac closes all apps before it can shut down. When you experience problems when trying to shut down your Mac, it’s often caused by an app that failed to close.
So before anything else, check if there are any open apps. An app won’t officially close without your input if there’s an unsaved document in it.
To quit a Mac app normally, choose Quit from the app’s menu in the menu bar, or press Command (⌘)+ the Q key.
Is An App Frozen or Crashed?
If you’re unable to close an app normally, you may need to force quit that app.
To force quit a Mac App, do one of the following:
- Command-Click (right-click) on the app’s icon in the Dock and choose Force Quit
- Press these three keys together: Option, Command, and Escape and select the app in the Force Quit window, then click Force Quit
- Choose Force Quit from the Apple menu in the upper-left corner of your screen and choose the app from the Force Quit window, then click Force Quit
- Command-Click (right-click) on the app’s icon in the Dock and press down the Alt key and the Quit option changes to Force Quit
- Open Activity Monitor and quit the app from there
What the heck is the SMC?
Your Mac’s system management controller (SMC for short) is a chip inside your Mac that runs most of the physical parts of the computer. This includes things like keyboards, LED indicators, cooling fans, and power button response.
The SMC is responsible for these and other low-level functions including:
- Responding to your MacBook’s display lid opening and closing
- Battery management
- Thermal management
- SMS (Sudden Motion Sensor)
- Ambient light sensing
- Keyboard backlighting
- Status indicator light (SIL) management
- Battery status indicator lights
Reset Your Mac’s SMC
Perform an SMC reset procedure on Mac desktops
- Shut Down your Macbook
- Unplug the power cord and wait for 15 seconds
- Plug the power cord back
- Wait for 5 seconds and then turn on your Mac
Perform an SMC reset procedure on MacBooks with Non-Removable batteries
- Shut down your Mac
- Unplug the battery charger from your MacBook
- Using the built-in keyboard, press Shift-Control-Option on the left side of the keyboard, then press the power button at the same time. Hold these keys and the power button for 10 seconds
- For MacBooks with Touch ID, the Touch ID button is your power button
- Release all keys and connect the power adapter
- Press the power button and turn on your MacBook
Perform an SMC reset procedure on MacBooks with Removable batteries
- Shut down your MacBook
- Disconnect the battery charger
- Remove the battery
- Press and hold the power button for 10 seconds
- Replace the battery
- Plug MacBook back into the charger
- Push the power button to turn on your MacBook
Next, reset NVRAM
Nonvolatile Random-Access Memory (or NVRAM for short) is a tiny bit of system memory that’s set aside to store specific settings on your Mac. These are typically settings that our Macs and its users need to access quickly, including audio volume, display resolution, startup disk selection, time zone, and recent kernel panic information.
Resetting NVRAM often helps when experiencing problems related to these types of settings. If your Mac is confused about which disk to starts up from or you see a question mark icon as your Mac starts up, resetting NVRAM might resolve the issue.
NVRAM reset on your Mac
- Restart
- Press and hold the Command-Option-P-R keys immediately after you hear the startup sound
- Hold these keys until the computer restarts, and you hear the startup chime for the second time
- Release the keys
After resetting your Mac’s NVRAM, open System Preferences and check and adjust if needed those settings that were reset, including sound volume, display resolution, startup disk selection, and time zone.
What’s a kernel panic?
Some shutdown issues are related to recent kernel panic events and resetting your NVRAM helps remedy those problems. Kernel panics tend to lead to system-wide crashes, sudden restarting, and shutdowns.
They are computer errors where the operating system (your Mac’s macOS or OS X) cannot quickly or easily recover. Kernel panic events are often triggered when the operating system attempts to access or write to memory erroneously. The most likely causes of kernel panic are faulty software, software bugs, or malware. A kernel panic is also caused by damaged, defective, or incompatible hardware, including external devices attached to your Mac.
Investigate with Apple Diagnostics or Apple Hardware Test
Apple Diagnostics and Apple Hardware Test are tools that help you diagnose problems with your Mac’s internal hardware. This includes things like your logic board, system memory, and wireless components. Even if your Mac doesn’t start up, you still might be able to access Apple Diagnostics or Apple Hardware Test. These apps tell you if the hardware you installed, such as additional memory, is incompatible, improperly installed, or defective.
Both Apple Diagnostics and Apple Hardware Test don’t check any external hardware components, like USB, or any non-Apple devices. And since these are hardware tools, they do not check your Mac’s operating system (macOS or MAC OS X) or any application problems such as app or extension conflicts.
- For Macs from 2013 or later, use Apple Diagnostics, already built into your Mac
- If your Mac is from 2012 or earlier and has OS X v10.8.4 or later, use Apple Hardware Test, already on your Mac
- If your Mac is from 2012 or earlier and has OS X v10.8.3 or earlier, use the system software disc or USB flash drive that came with your Mac
Use Apple Diagnostics
- Unplug all external components except the keyboard, mouse/trackpad, & display. Everything else, disconnect from your Mac
- Select Apple menu > Restart, then press and hold the D key while the Mac restarts
- Apple Diagnostics starts automatically, just follow the on-screen instructions
- When Apple Diagnostics is finished, it lists any problems it finds
Use Apple Hardware Test
- Disconnect all external devices except the keyboard, mouse/trackpad, & display. Everything else, disconnect them from your Mac
- Choose Apple menu > Restart, then press and hold the D key while the Mac restarts
- When the Apple Hardware Test chooser screen appears, select the language you want to use, then press Return or click the right arrow
- If you don’t see the chooser screen, try starting Apple Hardware Test from the Internet
- Reconnect your Mac to your network via WiFi or Ethernet and restart your Mac while pressing and holding both the Option and D keys.
- When the Apple Hardware Test main screen appears, follow the on-screen instructions
- If Apple Hardware Test detects a problem, a message appears. Take note of that message–it’s helpful if you seek further assistance with Apple Support or a service provider
Try a Safe Boot
A Safe Mode boot deletes system caches, and that may help after a macOS or Mac OS X update or upgrade. Safe Mode is also only a way to check if the issue is global or limited to your User folder. So it’s worth a try to restart in Safe Mode. If any third-party software is loading automatically and causing problems, safe mode checks your system and helps with the following things.
Safe Mode Checks
- Repair any directory issues
- Use required kernels only
- Prevent any start-up items from launching
- Delete caches files
Entering Safe Mode
- Shut Down your Mac anyway you can
- After your Mac shuts down, wait 10 seconds, then press the power button
- Immediately after you hear the startup tone, hold down the Shift key
- Push the shift key as soon as possible after you hear the startup tone, but not before
- Release the Shift key when you see the gray Apple logo and progress indicator
This starts it into Safe Mode, with all extensions turned off. Safe Mode is slow to start, so give it time. It takes longer than usual to reach the login screen or your desktop because your Mac performs a directory check of your startup disk as part of a safe mode. If your Mac works alright in Safe Mode, go back to the Apple menu. From the drop-down menu and choose Restart.
Give Terminal a Spin
Terminal just plain helps out with a lot of tasks and problems. So let’s put it to use in clearing out all that cache data and font maintenance resolved the issue.
Basic Terminal shut down and reboot commands
- To restart the machine immediately use osascript -e ‘tell application “System Events” to restart’ OR sudo shutdown -r now
- You can also use sudo reboot or sudo reboot -r now
- To restart in a set period of minutes use sudo reboot -r +the number of minutes
- To shut down off immediately use the command osascript -e ‘tell application “System Events” to shut down’
- You can also use sudo shutdown -h now or the command sudo halt (this kills all open applications and does NOT give you the opportunity to save your data)
- To power off in a set period of minutes use sudo shutdown -h +the number of minutes (again this kills all open applications and processes)
Try a series of Terminal commands
Open a Terminal session ( MacintoshHD>Applications > Utilities) and type in the following commands one-by-one
- rm -rf ~/Library/Caches/*
- rm -rf ~/Library/Saved\ Application\ State/*
- sudo rm -rf /Library/Caches/*
- sudo rm -rf /System/Library/Caches/*
- atsutil databases -removeUser
- sudo atsutil databases -remove
- sudo atsutil server -shutdown
- sudo atsutil server -ping
- sudo rm -rf /var/folders/*
After performing the last Terminal command, Restart.
Reader Rick suggests these steps in Terminal as an alternative
- Open Terminal and run these commands:
- sudo /System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -seed -lint -r -f -v -dump -domain local -domain system -domain user -domain network
- killall Dock
- sudo mdutil -E /
- Restart your Mac
Reader Tips
- Go to System Preferences > Users&Groups and then to Login Items for your user. Now remove everything from Login Items. And then shut down using the power button. After rebooting, shutdown and restart, check and see how your Mac functions. If all looks good, shut down again, but this time using Apple Menu > Shut Down
- I shut down my Mac by holding down the power button. Then I used Recovery Mode ( turn it on holding Cmd + R keys.) Then chose Disk Utility, selected my Mac’s main hard drive and clicked on Repair Disk. When it finished, restarted the Mac. For me, no more problems with my Mac shutting down normally after repairing my HDD
- Delete all the printers in the System Preferences > Printers & Scanners and then add them in again. After a Restart, Shut Down, Sleep, and Restart all work again!
- What I did: before I select ‘restart’ or ‘shut down,’ I open the force quit window and force quit any app that had not managed to quit. Then I hit ‘restart’ or ‘shut down.’ I haven’t had the hanging problem since doing this additional step!
- Relaunch Finder before you completely shut down your computer by pushing option + command + escape. It should be work.
- My only workaround is to make sure the trash is empty before I shut down. I can’t explain why this works for me, but it just does
- Type “sudo shutdown -r now” in Terminal to shut down. Then power up and see if the problem resolves. It did for me
- Delete everything out of the System Library Cache folder. This worked for me. I can now restart, logoff and shutdown
- Go to your Finder “Go” menu hold the option key and choose Library. Then go to Preferences folder and trash these 2 files: com.apple.finder.plist & com.apple.sidebarlists.plist. Then Restart.
- Shutdown holding the power button. Then turn it on holding Cmd + R keys to enter into Recovery Mode. After that choose “Disk Utility,” select your HDD and press “Repair Disk.” When it finishes, restart your Mac. Done.
Summary
Most of the Power System-related issues on your Mac are addressed by the SMC procedure (steps 1 through 4). If your shutdown issues are related to recent kernel panic events, the NVRAM process( Steps 5 through 9) addresses those problems. Since it is hard to figure out the cause of the problem, we usually do both the SMC and NVRAM reset and check our system using Apple Diagnostics or Apple Hardware Test when faced with this issue of Mac Not Shutting Down.
And if those steps don’t do the trick, try a Safe Boot and see if that isolates the problem.
We hope you find these simple steps helpful in tackling this issue so that you will not have to press the ON/OFF button on your Mac every time you want your Mac to shut down.
Obsessed with tech since the early arrival of A/UX on Apple, Sudz (SK) is responsible for the original editorial direction of AppleToolBox. He is based out of Los Angeles, CA.
Sudz specializes in covering all things macOS, having reviewed dozens of OS X and macOS developments over the years.
In a former life, Sudz worked helping Fortune 100 companies with their technology and business transformation aspirations.
Rob says
Reader Rick’s Terminal commands worked for me as well. Many thanks for his gift from 2018 that keeps on giving!
Dan says
Reader Rick’s Terminal commands did the trick for me. Finally solved the problem on Catalina. VERY MUCH APPRECIATED!
Juliy V. Chirkov says
thank a lot for this compilation!
3 commands in sequence, suggested by Rick P in comment https://appletoolbox.com/mac-will-not-shut-fix/#comment-1297000, completely resolved the issue on macOS Big Sur 11.2.1, and now I’m able again to restart and shutdown the system in common way instead of sudoing “restart” or “shutdown” in console
Lucy says
Rick’s Terminal commands did the trick and help solved my Spotlight/Indexing issue! Many thanks.
Eric Edwards says
Excellent resource, but how do you Safe Boot/enter terminal mode if you have same issues above AND a screen that has gone permanently dark?
Travis says
Same issue/question here.
I have an issue with my NVIDIA discrete GPU not working anymore (also my resolution settings are damaged) so I have to use the integrated Intel GPU only. I have to boot in verbose mode, have set custom NVRAM variables upon startup, etc etc (i don’t even remember what i did anymore)
Otherwise, my screen will be completely black.
I’m not sure if cleaning the boot, system, or other caches will screw up this temporary fix of mine.
Benny says
This is a fantastic resource. Tried most of the things on this page and I think one of the suggestions in the reader comments solved the shutdown/restart issue for my MacBook Pro early 2011 with a new ssd recently installed. Thanks a lot for putting this page together.
steve says
I took it futher and remove the KEXT files in /Library/Extensions
Create a new folder called Unused
/Library/Extensions/Unused
Move ALL the KEXT files in there.
Observe.
Then, as it resets and hopefully works, start moving these KEXT files back in. Just remember though, they are basically device drivers.
Christian says
Hi. I’m on High Sierra 10.13.6 as well. And my 2010 iMac also didn’t want to restart or shutdown anymore. I have followed all steps in the Terminal Tips and now it works fine again. Thank you so much! Stay safe and healthy!
Rick says
I had the same issue on my MacBook Pro and tried many of the above suggestions (from another site, not this one). I could not figure out why my MacBook was suddenly acting up. Then I realized that our school had put a program on my computer that help with calling students at home. I took a guess that maybe that program was not quitting and in fact was running all the time.I decided to try logging out first and then quitting. It has shut down correctly every single time over the last few weeks when I have done that. I think that program is running but does not show up as active. When I log out I think maybe I close it. I don’t know if this is the case, but I just thought I would share this in case could help someone else out.
John says
Thank you so much – the 2020-001 security update for High Sierra had bricked my restart and your first set of terminal commands was a brilliant fix (after working through all of the preceding advice).
Heduino says
After upgrading from Snow Leopard to El Capitan my MacBook just wouldn’t shut down. I tried all this. It’s a Macbook Pro 15″, i7 2.3mhz. Still, no success shutting down. Any thoughts??
Hi Heduino,
Give these commands a try–just be warned that your data will not be saved unless you saved it previously.
To restart, try sudo shutdown -r now or sudo reboot
To shut down off immediately use the command osascript -e ‘tell application “System Events” to shut down’
You can also use sudo shutdown -h now or the command sudo halt (this kills all open applications and does NOT give you the opportunity to save your data)
Hi Elizabeth, the second comand “osacript…” did not work. The last one “sudo shutdown -h now” did. But after rebooting again, it went back to the same problem. Since I’ve upgraded to Capitan I was never able to shutdown the normal way. (apple menu shut down). I think there is something, some event or whatever that is running for whatever reason. Is there a way to find out? In the Activity Monitor I can see anything ringing a bell…
Its interesting that if I boot in Safe Mode, I can then shutdown easily. But if I boot normally, I cant.The last time I waited 15 minutes, then I just forced quit holding down the power button.
I dont know if this is important. When I installed Capitan, it asked if I wanted to encrypt with FireVault. I said yes. Could that be the reason for all this??
Hi Heduino,
When you encrypt your hard drive with FileVault, your Mac always requires that you log in with your account password. With FileVault, all existing data on the Mac is encrypted–including an older data as well as new data.
While it’s always possible that encrypting your drive when installing El Cap caused this shutdown issue, it’s highly unlikely.
Just an update. Although I believe this post to be very useful, I found out that there were 2 items in the Startup Items in the Apple Menu/System Report. For some reason it could be that those items were out of date after the Capitan Instalation. After removing those items from there locations now the Mac seems to Shut down as it should. I also uninstalled ProTools because I found out that the version installed previous to the Capitan instalation wasn’t compatible with it and there are reviews that it causes slow shutdown of the Mac.
Hi Heduino,
Thanks for letting us know what worked in the end. Incompatible applications is another great thing to check when your Mac won’t shut down or start up properly. We’ll add it into our list of things to check.
Good catch!
Liz
The Terminal commands solved the problem for me too. What a relief! Thanks so much for making this information available.
Reader Rick’s Terminal commands did the trick for me. Thanks!
YES, the Terminal Spin did it!
I had a black screen on shutdown/restart so I couldn’t update or switch off my iMac except by forcing it with a button on the back. Besides I had a problem with Spotlight and nothing worked so far, now my Spotlight is back in the game.
Thanks a lot for this post!!!
After days and weeks of nightmare, finally the terminal commands on this article saved my old macBook to be formatted and reinstaled from zero.
Thanks, thanks, really useful.
Not impressed that a machine that costs a small fortune runs into so many basic problems. Can’t access my keynotes, to edit. Says no windows available and now machine doesn’t shut down.
I’m prompted for a password when I run the sudo line of code in both the original instructions and also the alternative.
I’m not sure which password, but when I type in my user password, nothing is displayed, but it returns “Sorry, try again.”
On the third attempt, it goes back to the user command prompt. Any thoughts?
Hi Theresa,
When you type in your admin password into Terminal, it does not show the exact letters you type–don’t know why that is, but it is.
Since you are getting “sorry, try again,” it means that the password you use is not an admin level password. Confirm that your user account is indeed an admin account via System Preferences > User & Groups and if so, try changing your user password and see if it will work.
If your account is not an admin account, use an account that is an admin account or try changing your account type.
If none of these things works, create a NEW ADMIN account and see if you can use that new account and password in Terminal.
It’s possible that your current admin account somehow got corrupted–if you think this is the case, take a look at this article for some tips on dealing with corrupt user accounts
Good luck,
Liz
I did the Reader Rick three terminal cmds and my months-long problem is solved!
I went through all the SMC, NVRAM, Safe Boot, Recovery reload etc and I still couldn’t get my iMac to shutdown/restart, meaning no software updates. Scoured the web again and came across this page.
THANK YOU VERY MUCH!
Thank you a lot for your helpful guidelines. While I am an owner of Mac mini (mid-2011) and I run macOS High Sierra, the only command that didn’t work was of diagnosis.
Actually, the problem (freeze on restart) solved with the sudo commands and my machine works fine right now.
I faced several issues before because due to the restart problem many updates where pending.
Here is how I fixed it along with a re-index of spotlight. This rebuilds LaunchServices and now my Mac re-starts and shuts down beautifully. It is also much faster now the LaunchServices in no longer giving a ton of errors in Console.
The Solution
Run
sudo /System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -seed -lint -r -f -v -dump -domain local -domain system -domain user -domain network
killall Dock
sudo mdutil -E /
Not sure if all of these are needed, but that’s what worked for me. The first command resets the Launch Sservices Database, the second one resets the Dock, and the third one triggers Spotlight reindexing.
Hi Rick,
Thank you so much for sharing what worked for you! It’s a great tip and we’ll add it to our reader tips section.
Awesome!
Sam
Rick, Thank you. Thank you. I tried everything for more than two days. I’m a 25 year Mac guy and nothing worked until I found your commands to zap the launch services. You made my day
Just wanted to say thank-you. I had to force my iMac to shut down, but your terminal command suggestions worked like a charm. And, I could update the OS, too.
For the time being I found a shortcut. Before you click on Shotdown in the apple menu, you press the H on the keyboard. It might be that the mac starts up a little slower after this.
On Terminal command #9, I got about 40 lines that all ended in “Operation not permitted”
here’s an example: rm: /var/folders/zz/zyxvpxvq6csfxvn_n0000108000082/T: Operation not permitted
is that normal or the sign of some other problem? Thanks in advance!
Hi GGMM,
It’s likely there are restrictions on those files that don’t allow you to remove them. Try the other steps and see if they help.
Sam
Can you explain for dummies what the terminal commands are actually doing?
Hi Cypress,
Sure, we’ll add that into the article. Thanks for the suggestion–very much appreciated.
Is there any particular Terminal command you’re curious about?
Sam
THANK YOU. The terminal lines towards the bottom worked fine to solve my issue!
I had been having a problem with my Mac not restarting or being able to shut down other than pressing the power button. Started while trying to install Security Update 2018-001. Had gone to many posts and support forums and did what they suggested, all to no avail. Even reinstalled OSX. Came across this page and tried all the steps – all of which I had tried before without success.
It was the part about the terminal commands that solved my problem. Thank you, thank you, thank you!
Hi Patrick!
Awesome, glad those terminal commands worked after all that searching. And thank you for sharing that this tip worked for you.
Cheers,
SK
Worked my way down the tips and finally the “Give Terminal A Spin” commands worked. Don’t know which one, because I did them all before the restart.
Thanks,
Art
THANKS!! IT WORKED LIKE A CHARM! I HAD SOME PROBLEMS WITH HIGH SIERRA ON MY IMAC
Hi Hans,
That’s awesome! Thanks for letting us know. Appreciate the feedback.
Liz
Hi, I have the opposite “problem”— Not staying asleep! I’m completely up-to-date with my iMac and it doesn’t matter whether I use a Hot Corner or the -Sleep command, it very often comes back awake. How many ways are there to wake the Mac and thus be able to turn them off?