Script to remove badge notifications in Mac
Ever noticed the red circle icons that sometimes hover above apps displayed in the dock of your Mac device? They are what we call badge notifications. These icons, usually with a number inside, show how many unread notifications the user has received in each app. This is helpful for those users who want to be regularly notified about new software updates, emails, messages, etc. But for the rest who are either specifically avoiding a particular software update or are just annoyed by seeing the red circle icons hovering above the apps, hiding the badge notifications is preferred. This document guides you on how to remotely remove badge notifications in a macOS device using Hexnode’s Custom Script feature.
Remove badge notifications of an app
defaults write com.apple.systempreferences AttentionPrefBundleIDs 0 && killall appname
appname with the name of the app whose badge notification has to be removed. Once the script is executed, the badge app icon disappears. If you want the notification badge to reappear, just open the application.
For example, to remove the badge icon for the Mail app:
defaults write com.apple.systempreferences AttentionPrefBundleIDs 0 && killall Mail
Remove badge notifications of entire Dock
If you want the badge notifications of the entire Dock removed, run the following script:
defaults write com.apple.systempreferences AttentionPrefBundleIDs 0 && killall Dock