What is Versioning:
The Wasabi versioning feature allows you to preserve, retrieve, and restore every version of every object stored in a Wasabi bucket. Once you enable versioning for a bucket, Wasabi preserves existing objects anytime you perform a PUT, POST, COPY, or DELETE operation on them. By default, GET requests will retrieve the most recently written version. Older versions of an overwritten or deleted object can be retrieved by specifying a version in the request.
While there is no native feature to mass delete all old object versions that have accumulated, below are some tips on how you can go about this.
Note that this config example discusses the use of Wasabi's us-east-2 storage region. To use other Wasabi storage regions, please use the appropriate Wasabi service URL as described in this here.
1. AWS CLI
From the AWS CLI (How do I use AWS CLI with Wasabi?), you can delete a specific version of a file by specifying the --version-id in the delete message. The version-id is something you can get using the aws cli command to list the objects along with their version-id
aws s3api list-object-versions --bucket <value> --endpoint-url https://s3.us-east-2.wasabisys.com
This will list the objects with their versions.
Then select the version Id from the "VersionId" field in the JSON formatted output, you can use the LastModifiedDate as a reference to select the most recent or the most outdated version of the file. After you've got the version-id, you can delete it by using the following command.
aws s3api delete-object --bucket <value> --key <value> --version-id <value> --endpoint-url https://s3.us-east-2.wasabisys.com
$ aws s3api delete-object --bucket mytestbucketwithversions --key "Folder_with_ten_5MB_files/5MB-copy-8.zip" --version-id 001552912074127114450-S1bSJDBWTH --endpoint-url=https://s3.us-east-2.wasabisys.com
2. S3 Browser
As an alternative, we've used a free software application called S3 Browser that allows you to see and remove versioned objects. While this is manual, it does let you go in and delete any object versions to trim down on your total storage volume.
For more details on S3 Browser, see How do I use S3 Browser with Wasabi?
A feature that customers sometimes enable along with versioning, is compliance, with an option to delete after retention. This feature is well paired with versioning because it allows you to update files (versioning), but not delete or edit the original versions (compliance), and then automatically delete all versions after the specified period of time (delete after retention). Note that all versions includes the current version as well. See this KB article for more details: Testing Compliance