I would like to use the Core Service to delete previous versions of a component, only keeping the most recent version. How can I do that?
The documentation says about the Delete method: "Permanently deletes the item or a specific version of the item from the system"
So you can delete versions by passing in the uri of the version (e.g. tcm:2-123-64-v4).
Tridion ships by default with a tool called "Purge Tool" that you can use for this purpose.
There is a visual interface, but also if you have business requirements to do this programmatically, or as a scheduled task, it also provides a command line interface.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With