First answer work well but not with dir name who contain spaces. (corrected logic because this was anything 50Kb or over)
#RESULTTODELETE=$(find ~/foo -mindepth 1 -maxdepth 1 -type d -exec du -ks {} + | awk '$1 >=<= 50' | cut -f 2-); RESULTTODELETE2=$(echo "$RESULTTODELETE" | sed 's, ,\\ ,g'); echo "$RESULTTODELETE2" | xargs rm -rf
Will work with :
~/f oo/a lpha
~/fo o/be ta
~/f o o/ep silon
~/foo/gamma