Purge old versions of an object

Hello guys, I have one doubt about versioning, I have a lot of object that can be updated many times and we are using version control to lead with it, my doubt is .. the older versions can be expunged, keeping just the new one version?
The ES api provides a good way that we can do it?

Thanks for your attention,

And you're saving the versions as separate documents with some field indicating the current version number (or timestamp)? Or are you relying on ES's versioning mechanism?

Hello magnusbaeck, thanks for reply,

We're using the version_type with external option, and the parameter we're using to determinate the version number is the timestamp like you've said.

Tks again,