Solvedhomebrew cask Bug report: Problem uninstalling the wireshark cask

Hi. I have followed the pre bug report but that didn't help. I've also looked up the issue online and found #27070 but the solution in there didn't work for me.

Description of issue

I had Wireshark installed with homebrew cask a while ago. It was a version that used XQuartz. Today, I saw there has been a new macOS native version out, so I tried to uninstall the old version but I get this error.

Output of `brew cask uninstall wireshark --verbose`
==> Running uninstall process for wireshark; your password may be necessary
==> Running uninstall script /usr/sbin/dseditgroup
==> Group not found.
Error: Command failed to execute!

==> Failed command:
/usr/bin/sudo -E -- #<Pathname:/usr/sbin/dseditgroup> -o delete access_bpf

==> Standard Output of failed command:

==> Standard Error of failed command:
Group not found.

==> Exit status of failed command:
#<Process::Status: pid 3916 exit 64>
Error: Kernel.exit
Output of `brew doctor`
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry and just ignore them. Thanks!

Warning: You have unlinked kegs in your Cellar
Leaving kegs unlinked can lead to build-trouble and cause brews that depend on
those kegs to fail to run properly once built. Run `brew link` on these:
Output of `brew cask doctor`
==> Homebrew-Cask Version
Homebrew-Cask 1.1.11-205-g80b39bb
caskroom/homebrew-cask (git revision 1781; last commit 2017-03-31)
==> Homebrew-Cask Install Location
==> Homebrew-Cask Staging Location
==> Homebrew-Cask Cached Downloads
==> Homebrew-Cask Taps:
/usr/local/Homebrew/Library/Taps/caskroom/homebrew-cask (3620 casks)
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-boneyard (0 casks)
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-bundle (0 casks)
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core (0 casks)
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-dupes (0 casks)
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-fuse (0 casks)
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-head-only (0 casks)
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-python (0 casks)
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-science (0 casks)
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-versions (0 casks)
/usr/local/Homebrew/Library/Taps/neovim/homebrew-neovim (0 casks)
/usr/local/Homebrew/Library/Taps/universal-ctags/homebrew-universal-ctags (0 casks)
==> Contents of $LOAD_PATH
==> Environment Variables

I appreciate any help. Thanks!
20 Answers

✔️Accepted Answer

@vitorgalvao same issue reported in @alireza's last comment. Digging a bit further:

sudo ls -al /Library/Application\ Support/Wireshark/
total 0
drwx------   3 504   wheel  102 Nov 18 15:21 .
drwxr-xr-x  24 root  admin  816 Apr  4 13:43 ..
drwxrwxr-x   4 504   staff  136 Apr  6 13:50 ChmodBPF

this complete sequence resulted in a successful uninstall:

sudo chown root:staff /Library/Application\ Support/Wireshark
sudo chmod 755 /Library/Application\ Support/Wireshark
brew cask install --force wireshark
brew cask uninstall --force wireshark

Other Answers:

brew cask install --force wireshark.

It seems the group wasn’t created (or was deleted after by something else), so try forcing installing over and then uninstalling.

More Issues: