Search code snippets, questions, articles...

Delete all empty directories in a directory in Ubuntu

You can delete all empty directories in a directory using below command. First we find all directories using find command and then delete them.
# Go to directory and execute command
-------------------------------------
find . -empty -type d -delete
Was this helpful?
0 Comments