I got a new Macbook Pro and restored from the backup, all of my packages are in still there and the path is still correct, but when I type a command that was installed on the previous system it returns an error. Take for example pstree
pstree
-bash: pstree: command not found
Someone elsewhere on the internet suggested reinstalling them, but I have way too many packages installed to go thru them one at a time.
The computer is running Mavericks. I used migration assistant to restore from a time machine backup and brew doctor
says my system is ready to brew.
Best Answer
From your answer above, it looks like you want to relink all your kegs, which is already answered here:
Is there a quick way to relink my homebrew kegs?
In one line:
brew list -1 | while read line; do brew unlink $line; brew link $line; done