#Loop while there are still package installed
while [[ `brew list | wc -l` -ne 0 ]]; do
    #Interate over each installed package
    for EACH in `brew list`; do
        #Uninstall each package
        brew uninstall $EACH --force
    done
done