Wireshark crash from protocol preference

Attempting to use the protocol preference feature in wireshark, at least on an M1 Mac, can lead to a crash that is difficult to recover from. You need to remove the state in wireshark or the next time you start, it will crash again – even after a superficial uninstall.

The following script will do enough cleanup so you can start again. You may need to do some minor updates if your directories don’t match.

#!/bin/ksh

rm /Applications/Wireshark.app 2> /dev/null
rm -r /Applications/Wireshark 2> /dev/null
rm -r /Library/Wireshark 2> /dev/null
rm -r /Library/StartupItems/ChmodBPF 2> /dev/null
rm -r ~/.config/wireshark 2> /dev/null