21

Today I'm dealing with the following problem:

Never Ending Eject Notifications

Is there some way I can get rid of these without spending my entire day clicking, short of Homer's Drinking Bird?

Note: This is not a duplicate of How do I clear All OS X notifications with 1 click?, because the notifications in my question aren't shown at all in the Notification Center, and thus the solution in that question doesn't work for this question.

  • I edited this question to explain how it's different from the one marked as a duplicate - the main distinction being that the linked solution doesn't actually work in this case. – Ken Williams May 17 '18 at 1:05
  • Did you work out what causes this? I have a new USB hub, with backup disk attached to it, and I'm getting this... – GreenAsJade Mar 22 at 20:06
32

I started killing processes with "Notification" in their name, and when I hit the one called "NotificationCenter" the smoke finally cleared:

killall NotificationCenter
| improve this answer | |
  • 5
    Ken, you made my weekend - I'm going to name a puppy after you! I might sound silly yelling "Ken Williams!" all over the park, but I'm good with that – Sean Chase Jun 30 '18 at 3:30
  • 1
    FWIW, pkill NotificationCenter works pretty much the same way. And it seems good to restart the process afterwards--its at: /System/Library/CoreServices/NotificationCenter.app/Contents/MacOS/NotificationCenter & (There's probably a more sophisticated way to do this with a single restart signal.) – MarkHu Sep 7 '18 at 17:33
  • 1
    Legend! Thank you! – Benjamin Dale Jan 29 at 22:03
  • @MarkHu: More gracefully: open /System/Library/CoreServices/NotificationCenter.app – Daniel Jun 15 at 7:21
3

The Apple Script from "software is fun", with 3 votes at the time of writing, in the suggested duplicate gets rid of all "Disk Not Ejected Properly" notifications on High Sierra (additionally you have to allow Script Editor to control the computer in Accessibility preferences as the post suggests):

tell application "System Events"
    tell process "NotificationCenter"
        set numwins to (count windows)
        repeat with i from numwins to 1 by -1
            click button "Close" of window i
        end repeat
    end tell
end tell
| improve this answer | |
  • I have the same problem and am not familiar with utilizing scripts on my Mac. Can anyone walk me through this process. I can't keep pressing the close button its killing me. – user303817 Sep 27 '18 at 3:20

You must log in to answer this question.

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