For instance, Google Chrome litters the filesystem and is not easy to clean up manually. Homebrew however can remove all traces by passing the --zap option:
brew uninstall --zap google-chrome
You can view the formula as follows: brew info --github google-chrome
Look for the zap stanza, there's a whole list of folders.