It's been several years since we took legacy files out of courses, but my shakey memory is that I check all the files in a folder and delete them all at once. Then the folders. Oh, I see you mean one by one in each course. Probably, unless you have access to the database and some really good instructions from somebody who knows how to manipulate it.
Don't forget to uncheck Legacy Files in Course Settings before you back up!
Don't forget to uncheck Legacy Files in Course Settings before you back up!