Is there a quick way to relink my homebrew kegs?
This bash command (taken from there) will unlink all installed formulas and then link them again:

brew list -1 | while read line; do brew unlink $line; brew link $line; done


I guess all formulas need to be linked, otherwise, whichever tool depends on them, won't be able to find them..