Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to bulk delete Spaces in Confluence.

Shivani Chhetri June 5, 2017

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

2 votes
Answer accepted
Andre Lehmann
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 5, 2017

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é

Maarten Cautreels
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 5, 2017

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

Shivani Chhetri June 5, 2017

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

tcooper_uk
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 22, 2018

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
TAGS
AUG Leaders

Atlassian Community Events