sed -i '/^[[:space:]]*$/d' my_file
awk -i inplace NF my_file
-iflag in above two commands does “in place” editing of the files, so if you just want to try the command without editing the file skip
In my experience
awk does the best job in deleting blank lines from a file.