Zet - How do I delete all empty lines in a buffer in vim?

How do I delete all empty lines in a buffer in vim?

:g/^$/d

:g will execute a command on lines which match a regex. The regex is โ€˜blank lineโ€™ and the command is :d (delete)

#vim