Is it possible to bulk delete Spaces in Confluence.

Hi,

There are around 60 Spaces that needs to delete in conflunece, and doing it manually is a big task. Could you please let me know if there is a way to bulk delete the spaces.

Conflunece Version: 

  • 5.8.10

1 answer

1 accepted

Hi Shivani,

if you use the Bob Swift CLI you can automate that with a common action.
Must be something like this:
--action runFromContentList --cql "space in key1,key2,keyX" --common '-action removeSpace --space @space@' --continue

Within Confluence, there is no way to bulk-delete spaces.

Kind regards
André

Hi Shivani,

Please also take a look at this older question. It contains a lot of valuable information (similar to the post from Andre).

Best,

Maarten

Thanks Andre and Maarten.

As there is no way to bulk-delete spaces within Confluence, I will have to check on the CLI.

 

Many Thanks,

Shivani

Almost...

All spaces except for:
--action runFromContentList --cql "space not in (KEY1,KEY2,KEY3)" --common "--action removeSpace --space ""@space@"" --continue" --continue

Only X spaces:

--action runFromContentList --cql "space in (KEY1,KEY2,KEY3)" --common "--action removeSpace --space ""@space@"" --continue" --continue

Full example with server info:

.\confluence.bat --server http://confluenceserver --user USERNAME --password "PASSWORD" --action runFromContentList --cql "space not in (KEY1,KEY2,KEY3)" --common "--action removeSpace --space ""@space@"" --continue" --continue

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Oct 24, 2018 in Confluence

Atlassian Research opportunity with Confluence templates

Do you use templates with Confluence? Take part in a remote 1-hr workshop. You'll receive USD $100 for your time!   We're looking for people to participate in a   remote 1-hr workshop...

1,555 views 26 14
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you