Trying to delete a cache directory with over 500,000 tiny files, went in to the directory issued a “rm -rf *” returned /bin/rm: Argument list too long.

The issue with rm -rf * is being replaced with a list of every single file in the directory. With a little bit of research I found out that the find commend has the delete option.

find . -type f -delete
There is also the verbose option which shows you which files are being deleted
find . -type f -print -delete