you can simply run SOQL query to select groups and perform
delete in anonymous apex
where DeveloperName = 'test'
and Type = 'Regular'
also you can use ant migrating tool to delete public groups
in order to delete metadata you need to run destructive changes
in short, you will need to name in
destructiveChanges.xml file, that you want to delete public groups
<?xml version="1.0" encoding="UTF-8"?>