Skip to main content
Question

Refreshing menu bar

  • May 7, 2021
  • 2 replies
  • 9 views

Forum|alt.badge.img+20

All, I created a little script to remove an application from a computer and it works well. However, the icon for the application remains in the menu bar. Is there a way to refresh the menu bar? I am thinking almost like killing the dock and having it come back.

2 replies

Forum|alt.badge.img+3
  • New Contributor
  • 7 replies
  • May 7, 2021

You can kill the SystemUIServer which manages all System Menus:

/usr/bin/killall -9 SystemUIServer

Forum|alt.badge.img+20
  • Author
  • Valued Contributor
  • 427 replies
  • May 7, 2021

Thank you @ggetenj I tried that but for some reason, the menu is refreshing but the icon isn't being removed. The app was launched using a LaunchAgent, which was force quit and removed. I might have to force the user to log out and have them log back in. This process does fix the icon issue.