The other day, I encountered an issue involving three directories, and two of them contained a subdirectory with the same name (target). My goal is to delete the target subdirectories in all places with a single command, and here’s the solution I found. Using the terminal to delete multiple directories. There is an useful command called find, this command is used to traverse nested directories and evaluate an expression for each element.