This article explains how to remove one or more page versions from a Confluence page using Confluence Command Line Interface (CLI).
removeContentVersion action removes a version from the revision history of Confluence content like a page or a blog.
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 |