delete empty subdirectories linux code example
Example 1: remove empty folders linux
find . -type d -empty -print -delete
Example 2: delete all empty files and folders in terminal
find /home/savona/ -type f -empty -exec rm {} \;
find . -type d -empty -print -delete
find /home/savona/ -type f -empty -exec rm {} \;