Hide or show the red Software Update badge on the macOS Dock
Run the following command in Terminal:
plist=$HOME/Library/Preferences/com.apple.dock.plist; let i=1; while true; do if [ "$(plutil -extract persistent-apps.$i.tile-data.file-label raw $plist)" = "System Settings" ]; then [[ $(plutil -extract persistent-apps.$i.tile-data.dock-extra raw $plist) = "true" ]] && state="NO" || state="YES"; plutil -replace persistent-apps.$i.tile-data.dock-extra -bool $state $plist; unset i plist state; break; fi; let i++; done && killall Dock
Note: if you've had the badge disabled for a while and enable it again, it will take some time before the badge reappears, but you can force it to show by checking for software updates in System Settings