/
How to remove page version(s) from a Confluence page using CLI
How to remove page version(s) from a Confluence page using CLI
This article explains how to remove one or more page versions from a Confluence page using Confluence Command Line Interface (CLI).
Instructions
removeContentVersion action removes a version from the revision history of Confluence content like a page or a blog.
- In the below Page History page, you see six versions for a Confluence page.
- Create a CSV file with the column name version. You can specify the version number(s) either in order or at random. For example, the CSV file can have the rows defined as 2, 3, 4 or 1, 3, 6.
Use removeContentVersion action along with runFromCSV action and run the below command to remove multiple versions from a page:
--action runFromCSV --file removecontent.csv --common "--action removeContentVersion --space "RemoveVersionCLI" --title "Removing Page Versions" --continue"
Here is result as displayed on the console window:
"RemovingPagesVersions" --continue" Run: --version "2" --action removeContentVersion --space RemoveVersionCLI --title Removing Page Versions --continue Version 2 removed from history for 'Removing Page Versions' in space RemoveVersionCLI. Run: --version "3" --action removeContentVersion --space RemoveVersionCLI --title Removing Page Versions --continue Version 3 removed from history for 'Removing Page Versions' in space RemoveVersionCLI. Run: --version "4" --action removeContentVersion --space RemoveVersionCLI --title Removing Page Versions --continue Version 4 removed from history for 'Removing Page Versions' in space RemoveVersionCLI. Run completed successfully. 3 actions were successful from file: removecontent.csv
, multiple selections available,
Related content
runFromCsv
runFromCsv
Read with this
removePageVersions
removePageVersions
More like this
How to replace group permissions with individual permissions in spaces using Confluence Command Line Interface (CLI)
How to replace group permissions with individual permissions in spaces using Confluence Command Line Interface (CLI)
Read with this
removePageVersion
removePageVersion
More like this
Examples
Read with this
How to remove pages with no specific labels using Confluence CLI
How to remove pages with no specific labels using Confluence CLI
More like this