find <directoryPath> -type d -empty | xargs rmdir
Or, alternatively:
find <directoryPath> -empty -type d -delete
(note that the -delete option implies -depth)
find <directoryPath> -type d -empty | xargs rmdir
Or, alternatively:
find <directoryPath> -empty -type d -delete
(note that the -delete option implies -depth)