brew upgrade removes dock icon in BigSur

996 Views Asked by At

whenever I run brew update && brew upgrade && brew upgrade --cask it updates my apps and removes the app icons from the macOS dock as well. after every upgrade I have to add the app icon back to the dock. quite annoying. this is on BigSur. this did not happen when I was on Catalina. Any idea what I could be doing wrong?

1

There are 1 best solutions below

0
On

Issue #102721 was created for this on GitHub. It has not been fixed yet. User vitorgalvao described the behavior as:

Interesting. It seems that after an app has been uninstalled for a few seconds, it will be auto-removed from the Dock. That’s good smart behaviour, which happens to clash with our way of doing things.

I agree this is something that should be fixed, but I also have no immediate solution. Whatever we do is bound to require changes to the upgrade and/or reinstall behaviours, so I wouldn’t expect this to be fixed soon.

He also posted this workaround until the issue has been fixed:

defaults export com.apple.dock "/path/to/temporary/file"

# Do the upgrade/reinstall as usual

defaults import com.apple.dock "/path/to/temporary/file"
killall Dock

It makes the Dock “flash” by being killed and reopened, but at least it the result at the end is the desired one.