You may not be able to delete lot of files with the command “rm”.
The error could be “Argument list too long”.
One possible solution is to use the “find” command and the “-delete” option.
The following command is deleting all files in the /deleteme directory.
It deletes also all files in subdirectories but leaves subdirectories structure intact.
find /deleteme -type f -print -delete