I uninstalled Homebrew, manually removed the /usr/local contents.
The following possible Homebrew files were not deleted:
/usr/local/.DS_Store
/usr/local/bin/
/usr/local/etc/
/usr/local/include/
/usr/local/lib/
/usr/local/libexec/
/usr/local/share/
/usr/local/texlive/
/usr/local/var/
You may consider to remove them by yourself.
You may want to restore /usr/local's original permissions
sudo chmod 0755 /usr/local
sudo chgrp wheel /usr/local
I want to know what the suggested commands do.
/usr/local/texlive/
is the result of installing TeX. If you still use this, you probably shouldn't delete the directory...