---
title: "How to delete a group in Bitbucket using Command Line Interface"
canonical: "https://support.appfire.com/space/SUPPORT/89142294/How%20to%20delete%20a%20group%20in%20Bitbucket%20using%20Command%20Line%20Interface"
format: markdown
---
<span style="color: #333333">This article explains how to delete a group in Bitbucket using Command Line Interface (CLI).</span>

## <span style="color: #333333">Instructions</span>

1. <span style="color: #333333">Use </span>[<span style="color: #333333">removeGroup</span>](https://appfire.atlassian.net/wiki/spaces/SCLI/pages/73368260/removeGroup)<span style="color: #333333"> to delete a group from the Bitbucket instance.</span>
2. <span style="color: #333333">To retain the users in the group, move them to to another group by mentioning the new group name using the </span>[<span style="color: #333333">--defaultGroup</span>](https://appfire.atlassian.net/wiki/spaces/SCLI/pages/73370759/--defaultGroup)<span style="color: #333333"> optional parameter.</span>
  <span style="color: #333333">With this command, all the users within </span>*<span style="color: #333333">testgroup </span>*<span style="color: #333333">are moved to the </span>*<span style="color: #333333">jira-administrators group </span>*<span style="color: #333333">and then the </span>*<span style="color: #333333">testgroup</span>*<span style="color: #333333"> is deleted.</span>
  <span style="color: #333333">In above CLI action, </span>
  - [<span style="color: #333333">--group</span>](https://appfire.atlassian.net/wiki/spaces/SCLI/pages/73370813/--group)<span style="color: #333333"> value refers to group name.</span>
  - [<span style="color: #333333">--defaultGroup</span>](https://appfire.atlassian.net/wiki/spaces/SCLI/pages/73370759/--defaultGroup)<span style="color: #333333"> value refers to default group to move users.</span>

> ℹ️ <span style="color: #333333">It is recommended to test this scenario in a non-production environment or run the action with the </span>[*<span style="color: #333333">--simulate</span>*](https://appfire.atlassian.net/wiki/spaces/BCLI/pages/65933690/Parameters#Parameters-simulate)<span style="color: #333333"> parameter to verify the behavior before deploying.</span>

> Macro (__confluenceADFMigrationUnsupportedContentInternalExtension__)