You can use the Admin API to delete all resources contained within a specific folder (including sub-folders).
Here's an example (in Node.js):
Note that you can also bulk select resources in the media library and delete them, e.g., by clicking the first image's checkbox, hold the SHIFT button and check the last image, then click the "Delete selected items" icon.
Note that if you have those images backed up, this will only delete the original images. For deleting backed up resources, please contact our support team and we'll be happy to assist.