There is no supported method to purge Events manually.
However, Unified Manager (rebranded as Active IQ Unified Manager from OnCommand Unified Manager with the 9.6 release) has inroduced a feature to allow you to set Event Retention and Performance Data Retention in the UM 9.6 release. You may view the Help for this feature here: https://library.netapp.com/ecmdocs/ECMLP2853092/html/frameset.html.
Screenshot for the feature view with defaults:
Screenshot for the feature view with warning when Performance Data Retention interval is less than Event Retention interval:
sorry for insisting but is there an unsupported way to purge all data manually? let's say I want to keep data for less than 1 month that the builtin data retention offers, I want to keep them for 2 weeks only. how do I do that?
There is a way to effect manual purging of events. This depends on the OCUM/ActiveIQ API, which was actually quite rich in functionality. I don't know if it has extended to more recent versions, last time I used it was against the first AIQUM 9.x release.
First, get yourself the NetApp Management SDK from the Support site. The NMSDK documents all the old ZAPI calls as well as the effective equivalent of the ZAPI calls to OCUM/AIQUM. Use the "perl bindings" section as it provides the most complete list of APIs and parameters. Whoever did the Perl stuff for the SDK - whether you use perl or not - did us all a huge favor. The normal way to make a ZAPI call was to manually build the XML to submit to the Controllers/OCUM. The perl bindings made each API into a function call that would automatically build the XML from the parameters provided and similarly automatically unwind the response XML data on return. Even if you don't use perl - the documentation here is the most complete.
In any case - the process was to first iterate all the events, say more recent than a particular date but only up to a certain date. Then, be sure the event is marked "resolved" - another API call. Then when all events are iterated and resolved, there is a "purge" call that will purge all resolved events.
The API to OCUM/AIQUM was never well publicized. These similar calls did not make the REST transition to my knowledge. But with a little digging, you can find all kinds of capabilities in these tools.