How to get rid of a stuck unread message badge on OS X

Having our messages (iMessage and SMS) available on our Macs is great, however sometimes we get an unread badge that can’t seem to go away, no matter how hard we look for the unread message, it is just not there1. In many cases, however, the solution is simple, and you don’t even need to reboot.

Quit Messages

Restart the dock, either using Activity Monitor or running killall Dock from the terminal

Many thanks to crazyj on Stack Exchange for sharing this easy trick.

Pro tip: you can see which conversations have unread messages by right clicking on the Messages icon. Not that opening these would help getting read of the stuck badge, however. ↩