Skip to end of banner
Go to start of banner

How to delete spaces in bulk using Confluence Command Line Interface (CLI)

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 8 Next »

This article presents step by step instructions on how to delete spaces in bulk using the Confluence CLI app.

Instructions

Use removeSpace action to bulk delete spaces from Confluence.

  • To remove spaces in bulk, create a CSV file with the space keys that need to be removed. Execute the following command using getSpaceList action. 

    --action getSpaceList --file "spacelist.csv"



  • Execute the following CLI action along with the runFromCsv action to delete spaces. Ensure that the spacelist.csv file has only space keys with the column name 'space'.

    --action runFromCsv --file "spacelist.csv" --common "--action removeSpace" --continue


    Sample CSV file:

The parameters used in the above actions are:

  • --space value refers to the space key.
  • --remove value refers to comma-separated list of space permissions.
  • --Common parameter string added to all run actions.
  • --continue value processing even after errors are encountered for run actions. Also used for some action to ignore certain errors like not found errors on remove actions.
  • --file value refers to path to file based content.


  • Test the action in a test environment before implementing in production. 






  • No labels