Linux Delete Empty Directories Recursively Bash

Posted on October 28, 2020 at 11:14 pm

This bash command will print all empty directories:

find /path/to/root/folder/ -type d -empty -print

Use -delete to delete all matches:

find /path/to/root/folder/ -type d -empty -delete

Receive updates via email

Other Posts

Updated Posts