We have a use-case where we need to create a dynamic group and add users dynamically into the group for a user assignment task. The users are variable and determined during runtime. We are using the following APIs to create the group and assign users.
Deleting groups[0] is possible with AEM Forms JEE set-ups but doesn't seem to be the case with OSGi/jackrabbit as there is no such method for the Group interface[1] while there is one for deleting the members.
Removing the node in JCR specific to the group is possible but not an ideal path forward but you can directly delete a group from usermanager although I am not sure if you'll find the dynamic group under useradmin created.