Remove empty directories

This entry is recently updated at May 31, 2017

Goal

Some processes leave a lot of empty directories around.


Note: Use -print instead of -delete, to first show what has been found

Commands

find . -type d -empty -delete

This command will search for all empty directories on a Linux system and remove them.

What do you think, was this useful?

Yes!

Share with friends:
Share on Twitter