How do I remove empty directories in Linux?
Update: 06/2023 This post is rather dated now. Simply use the find command instead. find /path/to/dir -empty -type d -delete And for empty files: find /path/to/dir -empty -type f -delete Old original post. You can use program called cleanlinks. The cleanlinks program searches the directory tree descended from the current directory for symbolic links whose […]