Delete all versions of file in Document Library
Pleased add the feature to delete all versions of files in Document library
Additionally add the option to 'delete all versions of all files' in a document library.
You can limit the number of last versions stored in SharePoint. Alternatively you can use a third party tool, which can do this task. Take a look on DMS-Shuttle. It does exactly what you are asking. Read that article: https://dms-shuttle.com/documentation/delete-version-history-in-sharepoint-online-office-365/