You should be able to search for these issues using a JQL such as:
"Epic Link" = [issuekeyofepic] and statusCategory != Done
This will find all of the issues in your epic which aren't in a 'Done' (green in colour) status. You can then use the bulk edit feature to transition all of these to whichever status you wish, assuming that your workflow allows the transition from the original statuses
@Anna Konieczna So you need to bulk close all issues under 6000 epics? Is there anything that these 6000 epics have in common that all other epics don't? You would need some kind of search/filter required in order to grab these epics so that you can delete all of the issues within them.
If you've got 6000 epics then this sounds like you would need some kind of script which deletes the issues over the API, but you would need some kind of search to find these epics in order to do that