You have loads of empty directories to delete in Linux? There is a command for that!
How to list empty directories in Linux?
Go to the directory in which you want to clean empty directories, and start with the following command that allows to list them :
find . -type d -empty -print
You’ll get an output such as:
root@hurricane:~# find . -type d -empty -print
Now if that is fine with you , the same command with a slight variation:
find . -type d -empty -delete
And there you go you’ve recusirvely deleted empty folders
Tested on Debian Stretch (9)