Following command can be used in the terminal to remove all the folders/directories starting with a string.
rm -rf /<YourParentFolderLocatiion>/<StringStartingWith>*/
Example:
rm -rf /tmp/deleteme*/
Above, all the folders starting with deleteme string will be deleted inside the /tmp folder location.