How to delete a group in Bitbucket using Command Line Interface
This article explains how to delete a group in Bitbucket using Command Line Interface (CLI).
Instructions
Use removeGroup to delete a group from the Bitbucket instance.
--action removeGroup --group "testgroup"
To retain the users in the group, move them to to another group by mentioning the new group name using the --defaultGroup optional parameter.
--action removeGroup --group "testgroup" --defaultGroup "jira-administrators"
With this command, all the users within testgroup are moved to the jira-administrators group and then the testgroup is deleted.
In above CLI action,
- --group value refers to group name.
- --defaultGroup value refers to default group to move users.
It is recommended to test this scenario in a non-production environment or run the action with the --simulate parameter to verify the behavior before deploying.