With all this awesomeness, it's easy to forget that these tools need to be polished and take care of to perform correctly. I'll make it easy for you with a few aliases I created:
alias brewup='brew update; brew upgrade; brew cleanup --prune-prefix; brew autoremove; brew cleanup; brew doctor'brewup will make it easy to keep homebrew neat. brew update will fetch the newest version of Homebrew and all formulae form GitHub using git. brew upgrade will upgrade outdated formulae. brew cleanup will remove any older versions of packages that you have, keeping things up to date. And last, brew doctor will check your system for potential problems. If no problems exist, you should see Your system is ready to brew after the doctor command runs.