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).


  1. Use removeGroup to delete a group from the Bitbucket instance.

    --action removeGroup --group "testgroup"
  2. 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, 

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.