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?
Asked
Active
Viewed 917 times
3

BPNBU
- 31
- 2
-
Maybe after the updade, you can : right click at the top left (in the Apple logo) > force to quit > click on Finder > restart – Jérôme Apr 29 '21 at 12:33
-
I've tried this but still the same. the dock icon is removed and I have to add it again. – BPNBU Apr 29 '21 at 19:56
1 Answers
2
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.

Karthic Raghupathi
- 2,011
- 5
- 41
- 57