Delete directories only and not files in a directory on Linux February 18, 20141 Min readIn LinuxAdd comment If you need to delete all the directories only and not files in a directory in Linux, you can do it with the “rm -r */” command View the code on Gist. FacebookTwitter