There are many ways of manipulating files and folders in Linux through the use of Perl, Python, AWK, Bash script and other programs but Find is slowly expanding to make certain tasks easier.
Removing empty folders now needs only a single line made up of few words. Using a terminal simply navigate to the top level directory that you'd like to scan for empty folders and run the following command:
find -type d -empty -delete
And that's it. Find will now scan through and remove any empty folders. This should only take a second or two but may take a little longer if you have masses of content.