I just upgraded my MacBook Air to Mavericks. The process appears to have removed almost all of the symlinks that homebrew put in /usr/local/bin. As I notice things missing then I relink them via brew unlink <keg> && brew link <keg> (although the symlinks are gone, homebrew still thinks they are there so I need to unlink first). This feels somewhat inefficient.

I could just loop through everything in /usr/local/Cellar but not every keg is automatically linked and I don't want to link those. So my next guess is to list every linked keg and relink them (using the above).

Is there some magic command that will find all the kegs that homebrewthinks are linked so that I can relink them?

Pretty sure that this just restored my homebrew into working order. Thanks!
– Robert MassaioliJul 15 '14 at 6:43

Amazing, thank you :) just made a gist out of it if you don't mind, I'm pretty sure that we are not the only one who faced this problem.. goo.gl/YTPMjh
– Stone AlessandroJul 3 '16 at 5:45

1

No, don't do --force! brew link should be sufficient, and some kegs really shouldn't be linked (as they can conflict with system libraries), whereas --force will force their linkage.
– Chris JeffersonMar 21 '17 at 20:38