Brew error - compinit:503: no such file or directory

Sharing the solution for a brew error that occurred after a macOS update...

Problem

: The following error is displayed when launching the terminal

compinit:503: no such file or directory: /usr/local/share/zsh/site-functions/_brew_cask
compinit:503: no such file or directory: /usr/local/share/zsh/site-functions/_brew_cask

Cause

: Error caused by a symlink

Solution

: Executed the following command which removes outdated packages from previous versions after the update

brew cleanup

+

If you want to dry run the brew cleanup command, add the -n option

Resolved!

Last updated