PowerShell SharePoint Online CSOM Delete Versions

check this one

(System.Reflection.Assembly)::LoadWithPartialName("Microsoft.SharePoint.Client")
(System.Reflection.Assembly)::LoadWithPartialName("Microsoft.SharePoint.Client.Runtime")

$password = Read-Host -Prompt "Enter password" -AsSecureString
$credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials("userID@yourtenant.com", $password)

$siteUrl = "https://yourtenant.sharepoint.com/sites/yoursitecollection"
$context = New-Object Microsoft.SharePoint.Client.ClientContext($siteUrl)
$context.Credentials = $credentials


$fileUrl = "/sites/yoursitecollection/path_to_file/filename";
$versions = $context.Web.GetFileByServerRelativeUrl($fileUrl).Versions;

$context.Load($versions)
$context.ExecuteQuery()

for($i=10;$i -lt $versions.Count-10; $i++) 
{
    $versions($i).DeleteObject()
    $context.ExecuteQuery()
}

https://stackoverflow.com/questions/30231132/how-do-i-delete-version-history-files-in-sharepoint-online