/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install)"
More installation information and options at: https://github.com/Linuxbrew/brew/blob/master/docs/Installation.md.
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/uninstall)"
Download the uninstall script and run ./uninstall --help
to view more uninstall options.