How to find and delete empty folders in Linux

Using the find command in Linux you can add options to find empty folders and also to delete them if required

Find:

find . -empty -type d 

Delete:

find . -empty -type d -delete

Justin Kelly

Justin Kelly

Data Engineeer, Business Analytics, Web Developer, Library Technology specialising in PHP and Tableau

Based in Melbourne, Australia

Feel free to contact me justin@kelly.org.au or _justin_kelly