Use the TemplateGroupCollection.Clear method to remove all groups from the collection. To remove a specific group from the collection, use the TemplateGroupCollection.Remove(TemplateGroup) method. To remove a group at a particular index, use the TemplateGroupCollection.RemoveAt(int) method.